r4636: Per tridge's wish (and probably correct behaviour), don't key off a
authorAndrew Bartlett <abartlet@samba.org>
Mon, 10 Jan 2005 11:09:31 +0000 (11:09 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:08:37 +0000 (13:08 -0500)
specific GENSEC mech type, but on the behaviour of the mech.

Andrew Bartlett
(This used to be commit f2bd7a5a699b91d99d7dc2a0b3b6c7006274a59c)

source4/librpc/rpc/dcerpc_auth.c

index 1c73bde6e4927e62a053d4346cb3db3ca14a87c9..c506c8fd4ce9b4d238ae059203d3e979516d436b 100644 (file)
@@ -100,12 +100,14 @@ NTSTATUS dcerpc_bind_auth(struct dcerpc_pipe *p, uint8_t auth_type, uint8_t auth
 
                p->conn->security_state.auth_info->credentials = credentials;
                
 
                p->conn->security_state.auth_info->credentials = credentials;
                
-               if (auth_type == DCERPC_AUTH_TYPE_SPNEGO) {
+               if (NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)) {
+                       /* We are demanding a reply, so use a request that will get us one */
                        status = dcerpc_alter_context(p, tmp_ctx, &p->syntax, &p->transfer_syntax);
                        if (!NT_STATUS_IS_OK(status)) {
                                break;
                        }
                } else {
                        status = dcerpc_alter_context(p, tmp_ctx, &p->syntax, &p->transfer_syntax);
                        if (!NT_STATUS_IS_OK(status)) {
                                break;
                        }
                } else {
+                       /* NO reply expected, so just send it */
                        status = dcerpc_auth3(p->conn, tmp_ctx);
                        credentials = data_blob(NULL, 0);
                        if (!NT_STATUS_IS_OK(status)) {
                        status = dcerpc_auth3(p->conn, tmp_ctx);
                        credentials = data_blob(NULL, 0);
                        if (!NT_STATUS_IS_OK(status)) {