strtok -> strtok_r
[abartlet/samba.git/.git] / source3 / smbd / msdfs.c
index 4ae735633b57b52a32ea0a1f6d908d7689362e00..8ffa0f7751cb4ce1cd0d1d0c9cb0a2143ab71da4 100644 (file)
@@ -288,12 +288,13 @@ static bool parse_msdfs_symlink(TALLOC_CTX *ctx,
        char **alt_path = NULL;
        int count = 0, i;
        struct referral *reflist;
+       char *saveptr;
 
        temp = talloc_strdup(ctx, target);
        if (!temp) {
                return False;
        }
-       prot = strtok(temp,":");
+       prot = strtok_r(temp, ":", &saveptr);
        if (!prot) {
                DEBUG(0,("parse_msdfs_symlink: invalid path !\n"));
                return False;
@@ -306,7 +307,7 @@ static bool parse_msdfs_symlink(TALLOC_CTX *ctx,
 
        /* parse out the alternate paths */
        while((count<MAX_REFERRAL_COUNT) &&
-             ((alt_path[count] = strtok(NULL,",")) != NULL)) {
+             ((alt_path[count] = strtok_r(NULL, ",", &saveptr)) != NULL)) {
                count++;
        }