Print this page
12513 SMB 3.1.1 support for server
@@ -9,11 +9,11 @@
* http://www.illumos.org/license/CDDL.
*/
/*
* Copyright 2019 Nexenta Systems, Inc. All rights reserved.
- * Copyright 2019 RackTop Systems.
+ * Copyright 2020 RackTop Systems, Inc.
*/
#include <smbsrv/smb2_kproto.h>
#include <smbsrv/smb_kstat.h>
@@ -971,10 +971,20 @@
/*
* Overwrite the (now final) SMB2 header for this response.
*/
(void) smb2_encode_header(sr, B_TRUE);
+ /*
+ * Cannot move this into smb2_session_setup() - encoded header required.
+ */
+ if (session->dialect >= SMB_VERS_3_11 &&
+ sr->smb2_cmd_code == SMB2_SESSION_SETUP &&
+ sr->smb2_status == NT_STATUS_MORE_PROCESSING_REQUIRED) {
+ (void) smb31_preauth_sha512_calc(sr, &sr->reply,
+ session->smb31_preauth_hashval);
+ }
+
/* Don't sign if we're going to encrypt */
if (sr->tform_ssn == NULL &&
(sr->smb2_hdr_flags & SMB2_FLAGS_SIGNED) != 0)
smb2_sign_reply(sr);