]> gitweb.michael.orlitzky.com - apply-default-acl.git/commitdiff
Add a test for a newly-discovered bug.
authorMichael Orlitzky <michael@orlitzky.com>
Fri, 25 Jan 2013 22:58:20 +0000 (17:58 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Fri, 25 Jan 2013 22:58:20 +0000 (17:58 -0500)
run-tests.sh

index 4cfea29007c13e091d0abd7af82b70b93f17f0d9..900ac1617b1c29e0415287e0dac0781e84b0eb2d 100755 (executable)
@@ -576,3 +576,30 @@ EOF
 ACTUAL=`getfacl --omit-header "${TARGET}"`
 compare
 
+
+# Make sure a mask with an execute bit doesn't count as being
+# executable.
+#
+TESTNUM=22
+TARGET="${TESTDIR}"/foo
+touch "${TARGET}"
+chmod 644 "${TARGET}"
+setfacl -m user::rw "${TARGET}"
+setfacl -m group::rw "${TARGET}"
+# Even though the mask has an 'x' bit, nobody can execute it.
+setfacl -m mask::rwx "${TARGET}"
+setfacl -d -m user::rwx "${TESTDIR}"
+setfacl -d -m group::rwx "${TESTDIR}"
+$BIN "${TARGET}"
+
+
+EXPECTED=$(cat <<EOF
+user::rw-
+group::rw-
+other::r--
+
+EOF
+)
+
+ACTUAL=`getfacl --omit-header "${TARGET}"`
+compare