]> gitweb.michael.orlitzky.com - apply-default-acl.git/commitdiff
Add one more test for the default mask execute bit.
authorMichael Orlitzky <michael@orlitzky.com>
Sat, 18 Aug 2012 01:38:06 +0000 (21:38 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Sat, 18 Aug 2012 01:38:06 +0000 (21:38 -0400)
run-tests.sh

index a01d47c1922df9481ecb7213405593b8956776d5..4df37b9ec594d04744e35d9ed6d4044340be4d72 100755 (executable)
@@ -229,3 +229,28 @@ EOF
 
 ACTUAL=`getfacl --omit-header "${TARGET}"`
 compare
+
+
+# If the default ACL mask denies execute, we should respect that
+# regardless of the existing execute permissions.
+TESTNUM=10
+TARGET="${TESTDIR}"/foo
+touch "${TARGET}"
+chmod 777 "${TARGET}"
+setfacl -m user:mail:rwx "${TESTDIR}"
+setfacl -d -m user:mail:rwx  "${TESTDIR}"
+setfacl -d -m mask::rw-  "${TESTDIR}"
+./aclq "${TARGET}"
+
+EXPECTED=$(cat <<EOF
+user::rwx
+user:mail:rwx  #effective:rw-
+group::r-x     #effective:r--
+mask::rw-
+other::r-x
+
+EOF
+)
+
+ACTUAL=`getfacl --omit-header "${TARGET}"`
+compare