Annotation of embedaddon/sudo/plugins/sudoers/regress/testsudoers/test5.sh, revision 1.1.1.1

1.1       misho       1: #!/bin/sh
                      2: #
                      3: # Test sudoers file mode check
                      4: #
                      5: 
                      6: # Create test file
                      7: TESTFILE=`pwd`/regress/testsudoers/test5.inc
                      8: cat >$TESTFILE <<EOF
                      9: root ALL = ALL
                     10: EOF
                     11: 
                     12: MYUID=`\ls -ln $TESTFILE | awk '{print $3}'`
                     13: MYGID=`\ls -ln $TESTFILE | awk '{print $4}'`
                     14: exec 2>&1
                     15: 
                     16: # Test world writable
                     17: chmod 666 $TESTFILE
                     18: ./testsudoers -U $MYUID -G $MYGID root id <<EOF
                     19: #include $TESTFILE
                     20: EOF
                     21: 
                     22: # Test group writable
                     23: chmod 664 $TESTFILE
                     24: ./testsudoers -U $MYUID -G -1 root id <<EOF
                     25: #include $TESTFILE
                     26: EOF
                     27: 
                     28: rm -f $TESTFILE
                     29: exit 0

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>