]> arthur.barton.de Git - netatalk.git/commitdiff
Couldn't create folders on FreeBSD 9.1 ZFS fileystems
authorFrank Lahm <franklahm@gmail.com>
Wed, 13 Feb 2013 16:27:52 +0000 (17:27 +0100)
committerFrank Lahm <franklahm@gmail.com>
Wed, 13 Feb 2013 16:27:52 +0000 (17:27 +0100)
Fixes bug #491.

NEWS
libatalk/acl/unix.c

diff --git a/NEWS b/NEWS
index 75a922918f94977e15215c7702a58d69566db08c..eb0b275cad80c9e8f6f728edf765265e0e91135e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,8 @@ Changes in 3.0.3
        alternative path for the netatalk lockfile.
 * UPD: systemd service file use PIDFile and ExecReload.
        From FR #70.
+* FIX: Couldn't create folders on FreeBSD 9.1 ZFS fileystems.
+       Fixed bug #491.
 
 Changes in 3.0.2
 ================
index 6284935173d87c7cced42ce80419977cc1df40f8..cc69d8ade3299bd20fbced73d3c5485b0f4f8132 100644 (file)
@@ -308,6 +308,14 @@ int posix_chmod(const char *name, mode_t mode) {
     /* Call chmod() first because there might be some special bits to be set which
      * aren't related to access control.
      */
+#ifdef BSD4_4
+    /*
+     * On FreeBSD chmod_acl() ends up in here too, but on
+     * FreeBSD sine ~9.1 with ZFS doesn't allow setting the g+s bit.
+     * Fixes PR #491.
+     */
+    mode &= 0777;
+#endif
     ret = chmod(name, mode);
 
     if (ret)