]> gitweb.michael.orlitzky.com - apply-default-acl.git/commitdiff
Add a missing "break" statement in a switch, and test for that bug.
authorMichael Orlitzky <michael@orlitzky.com>
Fri, 2 Mar 2018 23:03:41 +0000 (18:03 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Fri, 2 Mar 2018 23:03:41 +0000 (18:03 -0500)
run-tests.sh
src/libadacl.c

index 2df25af45d1e5baecf6902aec5634a605a713a73..2d14e5eceac060ac316b120b7ce164d2c111636c 100755 (executable)
@@ -911,3 +911,17 @@ EXPECTED=$( getfacl --omit-header "${TARGET}-direct" )
 "${BIN}" --recursive "${TESTDIR}"
 ACTUAL=$( getfacl --omit-header "${TARGET}" )
 compare
+
+
+# Ensure that we don't get "error" results for symlinks encountered
+# during a recursive traversal.
+TESTNUM=43
+TARGET="${TESTDIR}"
+mkdir "${TARGET}/foo"
+mkdir "${TARGET}/bar"
+ln -s "../foo" "${TARGET}/bar/baz"
+setfacl --default --modify user:${USERS[0]}:rw "${TARGET}"
+EXPECTED="1"
+"${BIN}" --recursive "${TARGET}"
+ACTUAL=$?
+compare
index 38e362e5066fdeb4f086ba19774fd65faae78c99..3feda6223d7249eed131a7e70918c335c9c9e703 100644 (file)
@@ -899,6 +899,7 @@ int apply_default_acl_fds(int parent_fd,
           if (result == ACL_SUCCESS) {
             result = ACL_FAILURE;
           }
+          break;
         case ACL_ERROR:
           result = ACL_ERROR;
         default: