svn commit: samba r20635 - in branches: SAMBA_3_0/source/smbd SAMBA_3_0_24/source/smbd

jra at samba.org jra at samba.org
Tue Jan 9 18:48:39 GMT 2007


Author: jra
Date: 2007-01-09 18:48:38 +0000 (Tue, 09 Jan 2007)
New Revision: 20635

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

Log:
Add placeholder to ensure we don't go into the
wcard unlink if bad_path was set. The error
returned here is almost certainly incorrect
and will need testing properly with smbtorture,
but I don't want to forget about this path
(yes Volker I know this is currently incorrect :-).
Jeremy.

Modified:
   branches/SAMBA_3_0/source/smbd/reply.c
   branches/SAMBA_3_0_24/source/smbd/reply.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/reply.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/reply.c	2007-01-09 16:12:54 UTC (rev 20634)
+++ branches/SAMBA_3_0/source/smbd/reply.c	2007-01-09 18:48:38 UTC (rev 20635)
@@ -2038,6 +2038,17 @@
 		struct smb_Dir *dir_hnd = NULL;
 		const char *dname;
 		
+		/* Ensure we check bad_path in the wcard case. 
+		 * This may not be correct w.r.t. Windows (needs
+		 * smbtorture test cases which will be forthcoming)
+		 * but prevents us from continuing in the obvious
+		 * bad path case. This is merely a placeholder. JRA.
+		 */
+
+		if (!rc && bad_path) {
+			return NT_STATUS_OBJECT_PATH_NOT_FOUND;
+		}
+
 		if (strequal(mask,"????????.???"))
 			pstrcpy(mask,"*");
 

Modified: branches/SAMBA_3_0_24/source/smbd/reply.c
===================================================================
--- branches/SAMBA_3_0_24/source/smbd/reply.c	2007-01-09 16:12:54 UTC (rev 20634)
+++ branches/SAMBA_3_0_24/source/smbd/reply.c	2007-01-09 18:48:38 UTC (rev 20635)
@@ -2032,6 +2032,17 @@
 		struct smb_Dir *dir_hnd = NULL;
 		const char *dname;
 		
+		/* Ensure we check bad_path in the wcard case. 
+		 * This may not be correct w.r.t. Windows (needs
+		 * smbtorture test cases which will be forthcoming)
+		 * but prevents us from continuing in the obvious
+		 * bad path case. This is merely a placeholder. JRA.
+		 */
+
+		if (!rc && bad_path) {
+			return NT_STATUS_OBJECT_PATH_NOT_FOUND;
+		}
+
 		if (strequal(mask,"????????.???"))
 			pstrcpy(mask,"*");
 



More information about the samba-cvs mailing list