svn commit: samba r21961 - in branches: SAMBA_3_0/source/smbd SAMBA_3_0_25/source/smbd

jra at samba.org jra at samba.org
Sat Mar 24 18:22:21 GMT 2007


Author: jra
Date: 2007-03-24 18:22:20 +0000 (Sat, 24 Mar 2007)
New Revision: 21961

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21961

Log:
Repair bug introduced by rev. 21960.
We need to do the initial strtok to set up the internal state.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/smbd/msdfs.c
   branches/SAMBA_3_0_25/source/smbd/msdfs.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/msdfs.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/msdfs.c	2007-03-24 18:14:46 UTC (rev 21960)
+++ branches/SAMBA_3_0/source/smbd/msdfs.c	2007-03-24 18:22:20 UTC (rev 21961)
@@ -242,11 +242,17 @@
 				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) &&

Modified: branches/SAMBA_3_0_25/source/smbd/msdfs.c
===================================================================
--- branches/SAMBA_3_0_25/source/smbd/msdfs.c	2007-03-24 18:14:46 UTC (rev 21960)
+++ branches/SAMBA_3_0_25/source/smbd/msdfs.c	2007-03-24 18:22:20 UTC (rev 21961)
@@ -242,11 +242,17 @@
 				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) &&



More information about the samba-cvs mailing list