summaryrefslogtreecommitdiff
path: root/source3/libads
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-01-23 11:04:10 +0100
committerVolker Lendecke <vl@samba.org>2008-01-23 15:08:04 +0100
commit587cf54c61c9f1f7bcae431a82035fd942716c32 (patch)
treec11ebe9ab6ed860e7e768b1b7de4db3c8ac609a1 /source3/libads
parent20512431321388cf293431b942cbbe9263d295c9 (diff)
downloadsamba-587cf54c61c9f1f7bcae431a82035fd942716c32.tar.gz
samba-587cf54c61c9f1f7bcae431a82035fd942716c32.tar.bz2
samba-587cf54c61c9f1f7bcae431a82035fd942716c32.zip
strtok -> strtok_r
(This used to be commit fd34ce437057bb34cdc37f4b066e424000d36789)
Diffstat (limited to 'source3/libads')
-rw-r--r--source3/libads/ads_struct.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/libads/ads_struct.c b/source3/libads/ads_struct.c
index 44bcdf76ea..8cc2f1215e 100644
--- a/source3/libads/ads_struct.c
+++ b/source3/libads/ads_struct.c
@@ -29,7 +29,8 @@ char *ads_build_path(const char *realm, const char *sep, const char *field, int
int numbits = 0;
char *ret;
int len;
-
+ char *saveptr;
+
r = SMB_STRDUP(realm);
if (!r || !*r) {
@@ -51,11 +52,11 @@ char *ads_build_path(const char *realm, const char *sep, const char *field, int
}
strlcpy(ret,field, len);
- p=strtok(r,sep);
+ p=strtok_r(r, sep, &saveptr);
if (p) {
strlcat(ret, p, len);
- while ((p=strtok(NULL,sep))) {
+ while ((p=strtok_r(NULL, sep, &saveptr)) != NULL) {
char *s;
if (reverse)
asprintf(&s, "%s%s,%s", field, p, ret);