]> git.samba.org - metze/samba/wip.git/blobdiff - source3/smbd/seal.c
s3-ntlmssp Split auth_ntlmssp_start into two functions
[metze/samba/wip.git] / source3 / smbd / seal.c
index 12672681fe0514f8dd453f5e4099a9b9f7c02f06..979c97c38ac05f269e510e0ae527e66c3705e864 100644 (file)
@@ -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.