summaryrefslogtreecommitdiffstats
path: root/source/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-03-24 18:22:20 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:18:53 -0500
commit8c7042b4192cb33988c1bbccdd4a80bb99fd0118 (patch)
tree39ab6e1ec3947253378cfac09fe94f60958122a0 /source/smbd
parenta2e27c443101a59ef3429a55e049af3ebd5ec1f2 (diff)
downloadsamba-8c7042b4192cb33988c1bbccdd4a80bb99fd0118.tar.gz
samba-8c7042b4192cb33988c1bbccdd4a80bb99fd0118.tar.xz
samba-8c7042b4192cb33988c1bbccdd4a80bb99fd0118.zip
r21961: Repair bug introduced by rev. 21960.
We need to do the initial strtok to set up the internal state. Jeremy.
Diffstat (limited to 'source/smbd')
-rw-r--r--source/smbd/msdfs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/smbd/msdfs.c b/source/smbd/msdfs.c
index 8f85b90fdcf..916f661eaae 100644
--- a/source/smbd/msdfs.c
+++ b/source/smbd/msdfs.c
@@ -242,11 +242,17 @@ static BOOL parse_msdfs_symlink(TALLOC_CTX *ctx,
int *refcount)
{
pstring temp;
+ char *prot;
char *alt_path[MAX_REFERRAL_COUNT];
int count = 0, i;
struct referral *reflist;
pstrcpy(temp,target);
+ prot = strtok(temp,":");
+ if (!prot) {
+ DEBUG(0,("parse_msdfs_symlink: invalid path !\n"));
+ return False;
+ }
/* parse out the alternate paths */
while((count<MAX_REFERRAL_COUNT) &&