summaryrefslogtreecommitdiff
path: root/source3/client/smbmnt.c
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/client/smbmnt.c
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/client/smbmnt.c')
-rw-r--r--source3/client/smbmnt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/client/smbmnt.c b/source3/client/smbmnt.c
index 7f1e1d5003..79c55b2f90 100644
--- a/source3/client/smbmnt.c
+++ b/source3/client/smbmnt.c
@@ -162,6 +162,7 @@ do_mount(char *share_name, unsigned int flags, struct smb_mount_data *data)
char *release, *major, *minor;
char *data1, *data2;
int ret;
+ char *saveptr;
if (asprintf(&opts,
"version=7,uid=%d,gid=%d,file_mode=0%o,dir_mode=0%o,%s",
@@ -172,8 +173,8 @@ do_mount(char *share_name, unsigned int flags, struct smb_mount_data *data)
uname(&uts);
release = uts.release;
- major = strtok(release, ".");
- minor = strtok(NULL, ".");
+ major = strtok_r(release, ".", &saveptr);
+ minor = strtok_r(NULL, ".", &saveptr);
if (major && minor && atoi(major) == 2 && atoi(minor) < 4) {
/* < 2.4, assume struct */
data1 = (char *) data;