summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-07-30 19:22:39 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:15:15 -0500
commit331ad9e7b8857ad5ed8b9383765a2fc06938c906 (patch)
tree822aea87b490547ebfdc3bf6a8eced5f0d615629 /source4
parentfd860073519b8eb3eb82dbad177a9a42f59c415e (diff)
downloadsamba-331ad9e7b8857ad5ed8b9383765a2fc06938c906.tar.gz
samba-331ad9e7b8857ad5ed8b9383765a2fc06938c906.tar.bz2
samba-331ad9e7b8857ad5ed8b9383765a2fc06938c906.zip
r17329: - after a composite_continue() we need to call return;
- add some comments metze (This used to be commit adb4ba9db2d22277e24fa56bdd781f9628f1a076)
Diffstat (limited to 'source4')
-rw-r--r--source4/librpc/rpc/dcerpc_util.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/source4/librpc/rpc/dcerpc_util.c b/source4/librpc/rpc/dcerpc_util.c
index 5468e4fd3f..d3eed5c4bb 100644
--- a/source4/librpc/rpc/dcerpc_util.c
+++ b/source4/librpc/rpc/dcerpc_util.c
@@ -1022,30 +1022,29 @@ static void continue_auth_auto(struct composite_context *ctx)
{
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;
}
}