]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/auth.c
Merge branch-allea
[netatalk.git] / etc / afpd / auth.c
index 9f5034dc0551051a8a5d7fd861496d67eb2cbbea..e8fc49eb0a957180e41a8ded07c9694641299df9 100644 (file)
@@ -340,6 +340,9 @@ static int login(AFPObj *obj, struct passwd *pwd, void (*logout)(void), int expi
     obj->uid = geteuid();
     obj->logout = logout;
 
+    /* pam_umask or similar might have changed our umask */
+    (void)umask(obj->options.umask);
+
     return( AFP_OK );
 }
 
@@ -1054,7 +1057,7 @@ int auth_load(const char *path, const char *list)
         return -1;
 
     strlcpy(buf, list, sizeof(buf));
-    if ((p = strtok(buf, ",")) == NULL)
+    if ((p = strtok(buf, ", ")) == NULL)
         return -1;
 
     strcpy(name, path);
@@ -1079,7 +1082,7 @@ int auth_load(const char *path, const char *list)
         } else {
             LOG(log_info, logtype_afpd, "uam: uam not found (status=%d)", stat(name, &st));
         }
-        p = strtok(NULL, ",");
+        p = strtok(NULL, ", ");
     }
 
     return 0;