svn commit: samba r4630 - in branches/SAMBA_4_0/source/librpc/rpc: .

tridge at samba.org tridge at samba.org
Mon Jan 10 08:56:55 GMT 2005


Author: tridge
Date: 2005-01-10 08:56:55 +0000 (Mon, 10 Jan 2005)
New Revision: 4630

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

Log:
for ncacn_np if we don't have an explicit request for one of the
advanced auth types we should do a plain bind. This fixes rpc
connections to ancient servers (like sun cascade)


Modified:
   branches/SAMBA_4_0/source/librpc/rpc/dcerpc.h
   branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/rpc/dcerpc.h
===================================================================
--- branches/SAMBA_4_0/source/librpc/rpc/dcerpc.h	2005-01-10 08:54:31 UTC (rev 4629)
+++ branches/SAMBA_4_0/source/librpc/rpc/dcerpc.h	2005-01-10 08:56:55 UTC (rev 4630)
@@ -120,8 +120,6 @@
 					DCERPC_SCHANNEL_DOMAIN| \
 					DCERPC_SCHANNEL_WORKSTATION)
 
-#define DCERPC_AUTH_OPTIONS    (DCERPC_SEAL|DCERPC_SIGN|DCERPC_SCHANNEL_ANY)
-
 /* use a 128 bit session key */
 #define DCERPC_SCHANNEL_128            (1<<12)
 
@@ -131,6 +129,8 @@
 /* set LIBNDR_FLAG_REF_ALLOC flag when decoding NDR */
 #define DCERPC_NDR_REF_ALLOC           (1<<14)
 
+#define DCERPC_AUTH_OPTIONS    (DCERPC_SEAL|DCERPC_SIGN|DCERPC_SCHANNEL_ANY|DCERPC_AUTH_SPNEGO)
+
 /* enable spnego auth */
 #define DCERPC_AUTH_SPNEGO             (1<<15)
 

Modified: branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c
===================================================================
--- branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c	2005-01-10 08:54:31 UTC (rev 4629)
+++ branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c	2005-01-10 08:56:55 UTC (rev 4630)
@@ -882,6 +882,10 @@
 		talloc_free(p);
 		return status;
 	}
+
+	if (!(binding->flags & DCERPC_AUTH_OPTIONS)) {
+		username = NULL;
+	}
 	
 	status = dcerpc_pipe_auth(p, binding, pipe_uuid, pipe_version, domain, username, password);
 	if (!NT_STATUS_IS_OK(status)) {



More information about the samba-cvs mailing list