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

jra at samba.org jra at samba.org
Mon Jun 13 20:42:21 GMT 2005


Author: jra
Date: 2005-06-13 20:42:21 +0000 (Mon, 13 Jun 2005)
New Revision: 7550

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

Log:
Steal the correct error return for invalid TID on NTcreateX from Samba4
(thanks tridge !).
Jeremy.

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


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/process.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/process.c	2005-06-13 20:10:00 UTC (rev 7549)
+++ branches/SAMBA_3_0/source/smbd/process.c	2005-06-13 20:42:21 UTC (rev 7550)
@@ -936,8 +936,14 @@
 			change_to_root_user();
 
 		/* does this protocol need a valid tree connection? */
-		if ((flags & AS_USER) && !conn)
-			return ERROR_DOS(ERRSRV, ERRinvnid);
+		if ((flags & AS_USER) && !conn) {
+			/* Amazingly, the error code depends on the command (from Samba4). */
+			if (type == SMBntcreateX) {
+				return ERROR_NT(NT_STATUS_INVALID_HANDLE);
+			} else {
+				return ERROR_DOS(ERRSRV, ERRinvnid);
+			}
+		}
 
 
 		/* does this protocol need to be run as the connected user? */



More information about the samba-cvs mailing list