From 5e0444c335b5afc0f86fab91ed1f02de9bdf2835 Mon Sep 17 00:00:00 2001 From: Frank Lahm Date: Wed, 13 Feb 2013 17:27:52 +0100 Subject: [PATCH] Couldn't create folders on FreeBSD 9.1 ZFS fileystems Fixes bug #491. --- NEWS | 2 ++ libatalk/acl/unix.c | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/NEWS b/NEWS index 75a92291..eb0b275c 100644 --- 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 ================ diff --git a/libatalk/acl/unix.c b/libatalk/acl/unix.c index 62849351..cc69d8ad 100644 --- a/libatalk/acl/unix.c +++ b/libatalk/acl/unix.c @@ -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) -- 2.39.2