summaryrefslogtreecommitdiffstats
path: root/plugins/sudoers/regress/testsudoers/test2.sh
blob: 0b0b3f88df61ca57232ee41fc0d157da833dd91d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh
#
# Test @include facility
#

: ${TESTSUDOERS=testsudoers}

MYUID=`\ls -ln $TESTDIR/test2.inc | awk '{print $3}'`
MYGID=`\ls -ln $TESTDIR/test2.inc | awk '{print $4}'`
exec 2>&1

echo "Testing @include"
echo ""
$TESTSUDOERS -U $MYUID -G $MYGID root id <<EOF
@include $TESTDIR/test2.inc
EOF

echo ""
echo "Testing #include"
echo ""
$TESTSUDOERS -U $MYUID -G $MYGID root id <<EOF
#include $TESTDIR/test2.inc
EOF

exit 0