summaryrefslogtreecommitdiff
path: root/source3/client/clitar.c
diff options
context:
space:
mode:
authorAlexander Bokovoy <ab@samba.org>2008-01-24 14:06:22 +0300
committerAlexander Bokovoy <ab@samba.org>2008-01-24 14:06:22 +0300
commiteba5fbff749b84a3e1bcd1f849c3454417532454 (patch)
tree42b9da9b96fb26706f4c8486cd01821f83e318f3 /source3/client/clitar.c
parentc17c64530ec479334f88679ef780691e06ccd65a (diff)
parent9344628bef74ac759197601dc5dd44514b836e3e (diff)
downloadsamba-eba5fbff749b84a3e1bcd1f849c3454417532454.tar.gz
samba-eba5fbff749b84a3e1bcd1f849c3454417532454.tar.bz2
samba-eba5fbff749b84a3e1bcd1f849c3454417532454.zip
Merge branch 'v3-2-test' of ssh://git.samba.org/data/git/samba into ctdb-merge
(This used to be commit 42d06d41bf2e9fb094f6064dc04f549d880b5f8d)
Diffstat (limited to 'source3/client/clitar.c')
-rw-r--r--source3/client/clitar.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/client/clitar.c b/source3/client/clitar.c
index 135815c3cd..816e7b1710 100644
--- a/source3/client/clitar.c
+++ b/source3/client/clitar.c
@@ -513,6 +513,7 @@ static bool ensurepath(const char *fname)
char *partpath, *ffname;
const char *p=fname;
char *basehack;
+ char *saveptr;
DEBUG(5, ( "Ensurepath called with: %s\n", fname));
@@ -528,7 +529,7 @@ static bool ensurepath(const char *fname)
*partpath = 0;
- /* fname copied to ffname so can strtok */
+ /* fname copied to ffname so can strtok_r */
safe_strcpy(ffname, fname, strlen(fname));
@@ -541,7 +542,7 @@ static bool ensurepath(const char *fname)
*basehack='\0';
}
- p=strtok(ffname, "\\");
+ p=strtok_r(ffname, "\\", &saveptr);
while (p) {
safe_strcat(partpath, p, strlen(fname) + 1);
@@ -558,7 +559,7 @@ static bool ensurepath(const char *fname)
}
safe_strcat(partpath, "\\", strlen(fname) + 1);
- p = strtok(NULL,"/\\");
+ p = strtok_r(NULL, "/\\", &saveptr);
}
SAFE_FREE(partpath);