s3-rpc_server: Call pipe_auth_verify_final() if needed.
authorAndreas Schneider <asn@samba.org>
Wed, 23 Apr 2014 08:42:12 +0000 (10:42 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 24 Apr 2014 09:21:05 +0000 (11:21 +0200)
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
source3/rpc_server/srv_pipe.c

index 28bcba76a9bd4fdf47c73ce1ad61b21316869caa..ebff114b28d5f677ab15a80a7e5530ec23a4d9d8 100644 (file)
@@ -48,6 +48,8 @@
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_RPC_SRV
 
+static NTSTATUS pipe_auth_verify_final(struct pipes_struct *p);
+
 /**
  * Dump everything from the start of the end up of the provided data
  * into a file, but only at debug level >= 50
@@ -460,6 +462,17 @@ static bool pipe_auth_generic_bind(struct pipes_struct *p,
                                    GENSEC_FEATURE_SIGN_PKT_HEADER);
        }
 
+       if (NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)) {
+               return true;
+       }
+
+       status = pipe_auth_verify_final(p);
+       if (!NT_STATUS_IS_OK(status)) {
+               DEBUG(0, ("pipe_auth_verify_final failed: %s\n",
+                         nt_errstr(status)));
+               return false;
+       }
+
        return true;
 }