]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
regress: test custom symlink permissions on FreeBSD and macOS
authorAlain Spineux <alain@baculasystems.com>
Thu, 3 Dec 2020 13:37:59 +0000 (14:37 +0100)
committerAlain Spineux <alain@baculasystems.com>
Thu, 3 Dec 2020 16:27:27 +0000 (17:27 +0100)
regress/tests/weird-files-test

index 8bd55e63fc5ce5a6e7fdc5cacc711d6aea43257f..ba57db9f806f6e058acccc331184367b28ffd0b3 100755 (executable)
@@ -36,6 +36,13 @@ cd weird-files
 perl socket.pl
 cd ..
 
+# some system like MacOS & FreeBSD have a lchmod() system call
+# and the chmod command has a "-h" option to not follow the symlink
+# lets try to use the "-h" option and ignore the error
+if ! chmod -l 751 "${cwd}/weird-files"/soft-file2 ; then
+   true # ignore the error
+fi
+
 start_test
 
 cat <<END_OF_DATA >tmp/bconcmds