From d517632b2d4ef26ea7bbd12794d1cf0709f33542 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Wed, 24 Sep 2014 15:25:09 +0200 Subject: [PATCH] afpd: umask handling, bug #576 Authored-by: Rasmus Borup Hansen Reviewed-by: Ralph Boehme --- NEWS | 1 + etc/afpd/unix.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 15f1fdff..3da15603 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,7 @@ Changes in 3.1.7 to the other Netatalk processes, bug #579 * FIX: afpd: Solaris locking problem, bug #559 * FIX: Handling of malformed UTF8 strings, bug #524 +* FIX: afpd: umask handling, bug #576 Changes in 3.1.6 ================ diff --git a/etc/afpd/unix.c b/etc/afpd/unix.c index a42a6ab9..e928fda9 100644 --- a/etc/afpd/unix.c +++ b/etc/afpd/unix.c @@ -229,7 +229,8 @@ int setdirunixmode(const struct vol *vol, char *name, mode_t mode) LOG(log_debug, logtype_afpd, "setdirunixmode('%s', mode:%04o) {v_dperm:%04o}", fullpathname(name), mode, vol->v_dperm); - mode |= (vol->v_dperm | DIRBITS) & ~vol->v_umask; + mode |= vol->v_dperm | DIRBITS; + mode &= ~vol->v_umask; if (dir_rx_set(mode)) { /* extending right? dir first then .AppleDouble in rf_setdirmode */ -- 2.39.2