]> arthur.barton.de Git - netatalk.git/commitdiff
"valid users" options and friends only use ',' as field delimiter
authorRalph Boehme <sloowfranklin@gmail.com>
Fri, 23 Nov 2012 07:15:51 +0000 (08:15 +0100)
committerRalph Boehme <sloowfranklin@gmail.com>
Fri, 23 Nov 2012 07:18:50 +0000 (08:18 +0100)
Netatalk 3 uses ',' and ' ' as field delimiter in the "valid users",
"invalid users", "rolist" and "rwlist" option for consistency with
other options that also allow the use of ' ' as field delimiter.
But as user and groupnames may contain spaces, we need to revert
to the Netatalk 2 behaviour where only ',' was used as delimiter.

Fixes bug #472.

libatalk/util/netatalk_conf.c

index fd7ebfd124777e99af77c2748f4f59ca7814e319..067ed45436781e08d38b23bd24518d1b96c12f55 100644 (file)
@@ -402,7 +402,7 @@ static char *volxlate(const AFPObj *obj,
  * check access list
  *
  * this function wants something of the following form:
- * "@group,name,name2,@group2,name3" or "@group name name2 @group2 name3"
+ * "@group,name,name2,@group2,name3".
  * A NULL argument allows everybody to have access.
  * We return three things:
  *     -1: no list
@@ -418,7 +418,7 @@ static int accessvol(const AFPObj *obj, const char *args, const char *name)
         return -1;
 
     strlcpy(buf, args, sizeof(buf));
-    if ((p = strtok(buf, ", ")) == NULL) /* nothing, return okay */
+    if ((p = strtok(buf, ",")) == NULL) /* nothing, return okay */
         return -1;
 
     while (p) {