Blob Blame History Raw
diff -up netatalk-2.0.3/etc/afpd/unix.c.chmod netatalk-2.0.3/etc/afpd/unix.c
--- netatalk-2.0.3/etc/afpd/unix.c.chmod	2008-10-10 10:33:20.000000000 +0200
+++ netatalk-2.0.3/etc/afpd/unix.c	2008-10-10 10:33:20.000000000 +0200
@@ -415,14 +415,14 @@ mode_t mode;
 struct stat *st;
 {
 struct stat sb;
-mode_t mask = S_IRUSR |S_IWUSR | S_IRGRP | S_IWGRP |S_IROTH | S_IWOTH;
+mode_t mask = S_IRWXU | S_IRWXG | S_IRWXO;  /* rwx for owner group and other, by default */
 
     if (!st) {
         if (stat(name, &sb) != 0)
             return -1;
         st = &sb;
     }
-   mode &= mask;	/* keep only rw-rw-rw in mode */
+
    mode |= st->st_mode & ~mask; /* keep other bits from previous mode */
    if ( chmod( name,  mode & ~default_options.umask ) < 0 && errno != EPERM ) {
        return -1;