summaryrefslogtreecommitdiff
path: root/source3/smbd/seal.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-07-26 10:19:54 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-08-03 18:48:04 +1000
commit8b983d232648944c18fe878a3ace0f58658ec24d (patch)
tree02555b34ad4f949ea300edf4a244ed9e471e5e5f /source3/smbd/seal.c
parent902df836807b700b2d27877f2fa5284930df3ff7 (diff)
downloadsamba-8b983d232648944c18fe878a3ace0f58658ec24d.tar.gz
samba-8b983d232648944c18fe878a3ace0f58658ec24d.tar.bz2
samba-8b983d232648944c18fe878a3ace0f58658ec24d.zip
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 <tridge@samba.org>
Diffstat (limited to 'source3/smbd/seal.c')
-rw-r--r--source3/smbd/seal.c8
1 files changed, 7 insertions, 1 deletions
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.