svn commit: samba r5813 - in branches/SAMBA_3_0/source/smbd: .

jra at samba.org jra at samba.org
Tue Mar 15 23:40:48 GMT 2005


Author: jra
Date: 2005-03-15 23:40:47 +0000 (Tue, 15 Mar 2005)
New Revision: 5813

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

Log:
Fix bug found by Jim McDonough <jmcd at us.ibm.com>
Win9x can send a resume name of "..". This will cause the parser to
complain (it thinks we're asking for the directory above the shared
path). Catch this as the resume name is only compared, never used in
a file access and replace it with "..".
Jeremy.

Modified:
   branches/SAMBA_3_0/source/smbd/trans2.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/trans2.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/trans2.c	2005-03-15 23:17:03 UTC (rev 5812)
+++ branches/SAMBA_3_0/source/smbd/trans2.c	2005-03-15 23:40:47 UTC (rev 5813)
@@ -1569,7 +1569,15 @@
 
 	srvstr_get_path(inbuf, resume_name, params+12, sizeof(resume_name), -1, STR_TERMINATE, &ntstatus, True);
 	if (!NT_STATUS_IS_OK(ntstatus)) {
-		return ERROR_NT(ntstatus);
+		/* Win9x can send a resume name of "..". This will cause the parser to
+		   complain (it thinks we're asking for the directory above the shared
+		   path). Catch this as the resume name is only compared, never used in
+		   a file access. JRA. */
+		if (NT_STATUS_V(ntstatus) == NT_STATUS_V(NT_STATUS_OBJECT_PATH_SYNTAX_BAD)) {
+			pstrcpy(resume_name, "..");
+		} else {
+			return ERROR_NT(ntstatus);
+		}
 	}
 
 	DEBUG(3,("call_trans2findnext: dirhandle = %d, max_data_bytes = %d, maxentries = %d, \



More information about the samba-cvs mailing list