test-0033.sh 702 B

123456789101112131415161718192021222324252627282930313233343536
  1. #!/bin/bash
  2. . ./test-common.sh
  3. . ./test-common-acl.sh
  4. if [ $ACL_TESTS = 0 ]; then
  5. echo "Skipping test 33: no ACL support"
  6. exit 77
  7. fi
  8. cleanup 33
  9. # ------------------------------- Test 33 ------------------------------------
  10. # With mode in 'create' directive, ACLs are overwriten by chmod
  11. preptest test.log 33 1 0
  12. setfacl -m u:nobody:rwx test.log
  13. $RLR test-config.33 --force
  14. getfacl test.log|grep "user:nobody:rwx" >/dev/null
  15. if [ $? = 0 ]; then
  16. echo "test.log must not contain user:nobody:rwx"
  17. exit 3
  18. fi
  19. getfacl test.log.1|grep "user:nobody:rwx" >/dev/null
  20. if [ $? != 0 ]; then
  21. echo "test.log.1 must contain user:nobody:rwx"
  22. exit 3
  23. fi
  24. checkoutput <<EOF
  25. test.log 0
  26. test.log.1 0 zero
  27. EOF