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

metze at samba.org metze at samba.org
Sun Jul 30 19:22:40 GMT 2006


Author: metze
Date: 2006-07-30 19:22:39 +0000 (Sun, 30 Jul 2006)
New Revision: 17329

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

Log:
- after a composite_continue() we need to call return;
- add some comments

metze
Modified:
   branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c
===================================================================
--- branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c	2006-07-30 19:00:16 UTC (rev 17328)
+++ branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c	2006-07-30 19:22:39 UTC (rev 17329)
@@ -1022,30 +1022,29 @@
 {
 	struct composite_context *c = talloc_get_type(ctx->async.private_data,
 						      struct composite_context);
+	struct pipe_auth_state *s = talloc_get_type(c->private_data, struct pipe_auth_state);
+	struct composite_context *sec_conn_req;
 
 	c->status = dcerpc_bind_auth_recv(ctx);
 	if (NT_STATUS_EQUAL(c->status, NT_STATUS_INVALID_PARAMETER)) {
-		struct pipe_auth_state *s = talloc_get_type(c->private_data, struct pipe_auth_state);
-		struct composite_context *sec_conn_req;
-
-		/* send a request for secondary rpc connection */
+		/*
+		 * Retry with NTLMSSP auth as fallback
+		 * send a request for secondary rpc connection
+		 */
 		sec_conn_req = dcerpc_secondary_connection_send(s->pipe,
 								s->binding);
-		if (composite_nomem(sec_conn_req, c)) return;
-		
 		composite_continue(c, sec_conn_req, continue_ntlmssp_connection, c);
-		
 		return;
 	} else if (NT_STATUS_EQUAL(c->status, NT_STATUS_LOGON_FAILURE)) {
-		struct pipe_auth_state *s = talloc_get_type(c->private_data, struct pipe_auth_state);
-		struct composite_context *sec_conn_req;
 		if (cli_credentials_wrong_password(s->credentials)) {
-			/* send a request for secondary rpc connection */
+			/*
+			 * Retry SPNEGO with a better password
+			 * send a request for secondary rpc connection
+			 */
 			sec_conn_req = dcerpc_secondary_connection_send(s->pipe,
 									s->binding);
-			if (composite_nomem(sec_conn_req, c)) return;
-			
 			composite_continue(c, sec_conn_req, continue_spnego_after_wrong_pass, c);
+			return;
 		}
 	}
 



More information about the samba-cvs mailing list