Print this page
12513 SMB 3.1.1 support for server

*** 9,18 **** --- 9,19 ---- * http://www.illumos.org/license/CDDL. */ /* * Copyright 2017 Nexenta Systems, Inc. All rights reserved. + * Copyright 2020 RackTop Systems, Inc. */ /* * Dispatch function for SMB2_SESSION_SETUP *
*** 28,37 **** --- 29,39 ---- smb_sdrc_t smb2_session_setup(smb_request_t *sr) { smb_arg_sessionsetup_t *sinfo; + smb_session_t *s = sr->session; uint16_t StructureSize; uint8_t Flags; uint8_t SecurityMode; uint32_t Capabilities; /* ignored - see above */ uint32_t Channel;
*** 78,87 **** --- 80,95 ---- rc = smb_mbc_decodef(&sr->smb_data, "#c", sinfo->ssi_iseclen, sinfo->ssi_isecblob); if (rc) return (SDRC_ERROR); + if (s->dialect >= SMB_VERS_3_11) { + ASSERT3U(s->smb31_preauth_hashid, !=, 0); + (void) smb31_preauth_sha512_calc(sr, &sr->command, + s->smb31_preauth_hashval); + } + /* * Decoded everything. Dtrace probe, * then no more early returns. */ DTRACE_SMB2_START(op__SessionSetup, smb_request_t *, sr);