]> 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)
committerEric Bollengier <eric@baculasystems.com>
Sat, 12 Dec 2020 15:35:44 +0000 (16:35 +0100)
regress/tests/weird-files-test

index 601bce798839c5f123f84f99cef7c38abeafbda0..f3577981b3103edf905711242a5d82856b92a8ea 100755 (executable)
@@ -34,6 +34,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 -h 751 "${cwd}/weird-files"/soft-file2 2> /dev/null ; then
+   true # ignore the error
+fi
+
 start_test
 
 cat <<END_OF_DATA >tmp/bconcmds