test-0032.sh 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #!/bin/bash
  2. . ./test-common.sh
  3. . ./test-common-acl.sh
  4. if [ $ACL_TESTS = 0 ]; then
  5. echo "Skipping test 32: no ACL support"
  6. exit 77
  7. fi
  8. cleanup 32
  9. # ------------------------------- Test 32 ------------------------------------
  10. # Without mode in 'create' directive, ACLs should be respected.
  11. # Also check that chmod is respected when setting ACLs
  12. preptest test.log 32 1 0
  13. chmod 600 test.log
  14. setfacl -m u:nobody:rwx test.log
  15. $RLR test-config.32 --force
  16. getfacl test.log|grep "user:nobody:rwx" >/dev/null
  17. if [ $? != 0 ]; then
  18. echo "test.log must have user:nobody:rwx ACL"
  19. getfacl test.log
  20. exit 3
  21. fi
  22. getfacl test.log|grep "group::---" >/dev/null
  23. if [ $? != 0 ]; then
  24. echo "test.log must have group::--- ACL"
  25. getfacl test.log
  26. exit 3
  27. fi
  28. getfacl test.log.1|grep "user:nobody:rwx" >/dev/null
  29. if [ $? != 0 ]; then
  30. echo "test.log.1 must have user:nobody:rwx ACL"
  31. getfacl test.log.1
  32. exit 3
  33. fi
  34. getfacl test.log.1|grep "group::---" >/dev/null
  35. if [ $? != 0 ]; then
  36. echo "test.log.1 must have group::--- ACL"
  37. getfacl test.log.1
  38. exit 3
  39. fi
  40. checkoutput <<EOF
  41. test.log 0
  42. test.log.1 0 zero
  43. EOF