Print this page
12513 SMB 3.1.1 support for server

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/smbsrv/smb_ktypes.h
          +++ new/usr/src/uts/common/smbsrv/smb_ktypes.h
↓ open down ↓ 13 lines elided ↑ open up ↑
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  23   23   * Copyright 2019 Nexenta by DDN, Inc. All rights reserved.
       24 + * Copyright 2020 RackTop Systems, Inc.
  24   25   */
  25   26  
  26   27  /*
  27   28   * Structures and type definitions for the SMB module.
  28   29   */
  29   30  
  30   31  #ifndef _SMBSRV_SMB_KTYPES_H
  31   32  #define _SMBSRV_SMB_KTYPES_H
  32   33  
  33   34  #ifdef  __cplusplus
↓ open down ↓ 847 lines elided ↑ open up ↑
 881  882   * Transition T6
 882  883   *
 883  884   *
 884  885   *
 885  886   */
 886  887  #define SMB_SESSION_MAGIC       0x53455353      /* 'SESS' */
 887  888  #define SMB_SESSION_VALID(p)    \
 888  889      ASSERT(((p) != NULL) && ((p)->s_magic == SMB_SESSION_MAGIC))
 889  890  
 890  891  #define SMB_CHALLENGE_SZ        8
      892 +#define SMB3_PREAUTH_HASHVAL_SZ 64
 891  893  
 892  894  typedef enum {
 893  895          SMB_SESSION_STATE_INITIALIZED = 0,
 894  896          SMB_SESSION_STATE_DISCONNECTED,
 895  897          SMB_SESSION_STATE_CONNECTED,
 896  898          SMB_SESSION_STATE_ESTABLISHED,
 897  899          SMB_SESSION_STATE_NEGOTIATED,
 898  900          SMB_SESSION_STATE_TERMINATED,
 899  901          SMB_SESSION_STATE_SHUTDOWN,
 900  902          SMB_SESSION_STATE_SENTINEL
↓ open down ↓ 30 lines elided ↑ open up ↑
 931  933          kmutex_t                s_credits_mutex;
 932  934          uint16_t                s_cur_credits;
 933  935          uint16_t                s_max_credits;
 934  936  
 935  937          uint32_t                capabilities;
 936  938          uint32_t                srv_cap;
 937  939  
 938  940          struct smb_sign         signing;        /* SMB1 */
 939  941          void                    *sign_mech;     /* mechanism info */
 940  942          void                    *enc_mech;
      943 +        void                    *preauth_mech;
 941  944  
 942  945          /* SMB2/SMB3 signing support */
 943  946          int                     (*sign_calc)(struct smb_request *,
 944  947                                          struct mbuf_chain *, uint8_t *);
 945  948          void                    (*sign_fini)(struct smb_session *);
 946  949  
 947  950          ksocket_t               sock;
 948  951  
 949  952          smb_slist_t             s_req_list;
 950  953          smb_llist_t             s_xa_list;
↓ open down ↓ 18 lines elided ↑ open up ↑
 969  972          /*
 970  973           * Maximum negotiated buffer sizes between SMB client and server
 971  974           * in SMB_SESSION_SETUP_ANDX
 972  975           */
 973  976          int                     cmd_max_bytes;
 974  977          int                     reply_max_bytes;
 975  978          uint16_t                smb_msg_size;
 976  979          uint16_t                smb_max_mpx;
 977  980          smb_srqueue_t           *s_srqueue;
 978  981          uint64_t                start_time;
      982 +
      983 +        uint16_t                smb31_enc_cipherid;
      984 +        uint16_t                smb31_preauth_hashid;
      985 +        uint8_t                 smb31_preauth_hashval[SMB3_PREAUTH_HASHVAL_SZ];
      986 +        uint8_t                 smb31_preauth_salt[32];
      987 +
 979  988          unsigned char           MAC_key[44];
 980  989          char                    ip_addr_str[INET6_ADDRSTRLEN];
 981  990          uint8_t                 clnt_uuid[16];
 982  991          char                    workstation[SMB_PI_MAX_HOST];
 983  992  } smb_session_t;
 984  993  
 985  994  /*
 986  995   * The "user" object.
 987  996   *
 988  997   * Note that smb_user_t object here corresponds to what MS-SMB2 calls
↓ open down ↓ 1248 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX