]> gitweb.michael.orlitzky.com - apply-default-acl.git/commitdiff
Add one more test for recursive symlink handling.
authorMichael Orlitzky <michael@orlitzky.com>
Mon, 3 Oct 2016 14:13:50 +0000 (10:13 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Mon, 3 Oct 2016 14:13:50 +0000 (10:13 -0400)
run-tests.sh

index a76b0e993578222bbec89edae5ea4fe0e104ab9a..cdf356a4227e3bb4f4e59338ed529226d7f45178 100755 (executable)
@@ -709,3 +709,24 @@ other::r--
 EOF
 )
 compare
+
+
+# Ensure that symlinks are not followed in subdirectories
+# (recursively).
+TESTNUM=29
+TARGET="${TESTDIR}/bar"
+touch "${TARGET}"
+mkdir "${TESTDIR}/foo"
+LINK2TARGET="${TESTDIR}/foo/bar-sym"
+ln -s "../bar" "${LINK2TARGET}"
+setfacl --default --modify user:${USERS[0]}:rwx "${TESTDIR}/foo"
+"${BIN}" --recursive "${TESTDIR}/foo"
+ACTUAL=$( getfacl --omit-header "${TARGET}" )
+EXPECTED=$(cat <<EOF
+user::rw-
+group::r--
+other::r--
+
+EOF
+)
+compare