From 8b983d232648944c18fe878a3ace0f58658ec24d Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 26 Jul 2011 10:19:54 +1000 Subject: s3-ntlmssp Split auth_ntlmssp_start into two functions This helps map on to the GENSEC semantics better, and ensures that the full set of desired features are set before the mechanism starts. Andrew Bartlett Signed-off-by: Andrew Tridgell --- source3/smbd/seal.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source3/smbd/seal.c') diff --git a/source3/smbd/seal.c b/source3/smbd/seal.c index 12672681fe..979c97c38a 100644 --- a/source3/smbd/seal.c +++ b/source3/smbd/seal.c @@ -86,7 +86,7 @@ bool is_encrypted_packet(const uint8_t *inbuf) static NTSTATUS make_auth_ntlmssp(const struct tsocket_address *remote_address, struct smb_srv_trans_enc_ctx *ec) { - NTSTATUS status = auth_ntlmssp_start(remote_address, + NTSTATUS status = auth_ntlmssp_prepare(remote_address, &ec->auth_ntlmssp_state); if (!NT_STATUS_IS_OK(status)) { return nt_status_squash(status); @@ -94,6 +94,12 @@ static NTSTATUS make_auth_ntlmssp(const struct tsocket_address *remote_address, auth_ntlmssp_want_feature(ec->auth_ntlmssp_state, NTLMSSP_FEATURE_SEAL); + status = auth_ntlmssp_start(ec->auth_ntlmssp_state); + + if (!NT_STATUS_IS_OK(status)) { + return nt_status_squash(status); + } + /* * We must remember to update the pointer copy for the common * functions after any auth_ntlmssp_start/auth_ntlmssp_end. -- cgit