blob: 8733bb8c000bd6ce340698c428c5de8e937b5c32 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/bin/sh
#
# Verify that runas_check_shell works as expected.
#
: ${TESTSUDOERS=testsudoers}
exec 2>&1
# This should fail due to fakeshell's shell
$TESTSUDOERS -u fakeshell -p ${TESTDIR}/passwd -P ${TESTDIR}/group \
admin /bin/ls <<'EOF'
Defaults runas_check_shell
admin ALL = (ALL) /bin/ls
EOF
# Expected failure
if [ $? -eq 0 ]; then
exit 1
else
exit 0
fi
|