test-0035.sh 770 B

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