From 3b706865f6bae7a2b04590da160bda939a3bafe5 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 25 May 2010 15:34:06 +1000 Subject: s3:auth Make AUTH_NTLMSSP_STATE a private structure. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes it a little easier for it to writen in terms of GENSEC in future. Andrew Bartlett Signed-off-by: Stefan Metzmacher Signed-off-by: Günther Deschner --- source3/smbd/seal.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'source3/smbd/seal.c') diff --git a/source3/smbd/seal.c b/source3/smbd/seal.c index 700d7ea02e..4662507c90 100644 --- a/source3/smbd/seal.c +++ b/source3/smbd/seal.c @@ -85,7 +85,7 @@ static NTSTATUS make_auth_ntlmssp(struct smb_srv_trans_enc_ctx *ec) * We must remember to update the pointer copy for the common * functions after any auth_ntlmssp_start/auth_ntlmssp_end. */ - ec->es->s.ntlmssp_state = ec->auth_ntlmssp_state->ntlmssp_state; + ec->es->s.ntlmssp_state = auth_ntlmssp_get_ntlmssp_state(ec->auth_ntlmssp_state); return status; } @@ -710,8 +710,11 @@ static NTSTATUS check_enc_good(struct smb_srv_trans_enc_ctx *ec) } if (ec->es->smb_enc_type == SMB_TRANS_ENC_NTLM) { - if ((ec->es->s.ntlmssp_state->neg_flags & (NTLMSSP_NEGOTIATE_SIGN|NTLMSSP_NEGOTIATE_SEAL)) != - (NTLMSSP_NEGOTIATE_SIGN|NTLMSSP_NEGOTIATE_SEAL)) { + if (!auth_ntlmssp_negotiated_sign((ec->auth_ntlmssp_state))) { + return NT_STATUS_INVALID_PARAMETER; + } + + if (!auth_ntlmssp_negotiated_seal((ec->auth_ntlmssp_state))) { return NT_STATUS_INVALID_PARAMETER; } } -- cgit