test-0048.sh 586 B

12345678910111213141516171819202122232425262728293031323334
  1. #!/bin/bash
  2. . ./test-common.sh
  3. cleanup 48
  4. . ./test-common-acl.sh
  5. if [ $ACL_TESTS = 0 ]; then
  6. echo "Skipping test 48: no ACL support"
  7. exit 77
  8. fi
  9. # ------------------------------- Test 48 ------------------------------------
  10. # Test that state file keeps the set ACLs
  11. preptest test.log 48 1 0
  12. cat > state << EOF
  13. logrotate state -- version 2
  14. EOF
  15. setfacl -m u:nobody:rwx state
  16. $RLR test-config.48
  17. getfacl state|grep "user:nobody:rwx" >/dev/null
  18. if [ $? != 0 ]; then
  19. echo "state file must have acls user:nobody:rwx"
  20. exit 3
  21. fi
  22. checkoutput <<EOF
  23. test.log 0
  24. test.log.1 0 zero
  25. EOF