* 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
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) {
struct vol *volume = NULL;
size_t current_pathlen, another_pathlen;
int i, suffixlen, vlen, tmpvlen, u8mvlen, macvlen;
- char *tmpname;
+ char tmpname[AFPVOL_U8MNAMELEN+1];
char path[MAXPATHLEN + 1];
ucs2_t u8mtmpname[(AFPVOL_U8MNAMELEN+1)*2], mactmpname[(AFPVOL_MACNAMELEN+1)*2];
char suffix[6]; /* max is #FFFF */
EC_NULL( volume->v_maccodepage = strdup(obj->options.maccodepage) );
vlen = strlen(name);
- tmpname = strdup(name);
+ strlcpy(tmpname, name, sizeof(tmpname));
for(i = 0; i < vlen; i++)
if(tmpname[i] == '/') tmpname[i] = ':';