Print this page
NEX-13644 File access audit logging
Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
Reviewed by: Roman Strashkin <roman.strashkin@nexenta.com>
Reviewed by: Saso Kiselkov <saso.kiselkov@nexenta.com>
Reviewed by: Rick McNeal <rick.mcneal@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
NEX-3080 SMB1 signing problem with Kerberos auth.
Reviewed by: Bayard Bell <bayard.bell@nexenta.com>
Reviewed by: Dan Fields <dan.fields@nexenta.com>
Reviewed by: Kevin Crowe <kevin.crowe@nexenta.com>
Reviewed by: Matt Barden <Matt.Barden@nexenta.com>
NEX-2485 SMB authentication flood handled poorly
NEX-2225 Unable to join NexentaStor to 2008 AD
SMB-108 Should have comments to relate types with their XDR functions
SMB-56 extended security NTLMSSP, inbound
SMB-50 User-mode SMB server
 Includes work by these authors:
 Thomas Keiser <thomas.keiser@nexenta.com>
 Albert Lee <trisk@nexenta.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/smbsrv/smb_token.h
          +++ new/usr/src/uts/common/smbsrv/smb_token.h
↓ open down ↓ 14 lines elided ↑ open up ↑
  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 2010 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
  24   24   *
  25      - * Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
       25 + * Copyright 2018 Nexenta Systems, Inc.  All rights reserved.
  26   26   */
  27   27  
  28   28  #ifndef _SMB_TOKEN_H
  29   29  #define _SMB_TOKEN_H
  30   30  
  31   31  #include <smbsrv/smb_inet.h>
  32   32  #include <smbsrv/smb_privilege.h>
  33   33  #include <smbsrv/smb_sid.h>
  34   34  
       35 +#if defined(_KERNEL) || defined(_FAKE_KERNEL)
       36 +#include <c2/audit.h>
       37 +#else
       38 +#include <bsm/audit.h>
       39 +#endif
       40 +
  35   41  /*
  36   42   * Don't want <smbsrv/netrauth.h> in here, but
  37   43   * uts/common/fs/smbsrv/smb_authenticate.c
  38   44   * wants this.  Todo: cleanup
  39   45   */
  40   46  #define NETR_NETWORK_LOGON                      0x02
  41   47  
  42   48  #ifdef __cplusplus
  43   49  extern "C" {
  44   50  #endif
↓ open down ↓ 19 lines elided ↑ open up ↑
  64   70   *
  65   71   * Access Token Flags
  66   72   *
  67   73   * SMB_ATF_GUEST        Token belongs to guest user
  68   74   * SMB_ATF_ANON         Token belongs to anonymous user
  69   75   *                      and it's only good for IPC Connection.
  70   76   * SMB_ATF_POWERUSER    Token belongs to a Power User member
  71   77   * SMB_ATF_BACKUPOP     Token belongs to a Power User member
  72   78   * SMB_ATF_ADMIN        Token belongs to a Domain Admins member
  73   79   */
  74      -#define SMB_ATF_GUEST           0x00000001
  75      -#define SMB_ATF_ANON            0x00000002
       80 +#define SMB_ATF_ANON            0x00000001
       81 +#define SMB_ATF_GUEST           0x00000002
  76   82  #define SMB_ATF_POWERUSER       0x00000004
  77   83  #define SMB_ATF_BACKUPOP        0x00000008
  78   84  #define SMB_ATF_ADMIN           0x00000010
  79   85  
  80   86  #define SMB_POSIX_GRPS_SIZE(n) \
  81   87          (sizeof (smb_posix_grps_t) + (n - 1) * sizeof (gid_t))
  82   88  /*
  83   89   * It consists of the primary and supplementary POSIX groups.
  84   90   * See also: smb_posix_grps_xdr()
  85   91   */
↓ open down ↓ 11 lines elided ↑ open up ↑
  97  103          smb_id_t        tkn_owner;
  98  104          smb_id_t        tkn_primary_grp;
  99  105          smb_ids_t       tkn_win_grps;
 100  106          smb_privset_t   *tkn_privileges;
 101  107          char            *tkn_account_name;
 102  108          char            *tkn_domain_name;
 103  109          uint32_t        tkn_flags;
 104  110          uint32_t        tkn_audit_sid;
 105  111          smb_buf32_t     tkn_ssnkey;
 106  112          smb_posix_grps_t *tkn_posix_grps;
      113 +        au_id_t         tkn_auid;
      114 +        au_mask_t       tkn_amask;
      115 +        au_asid_t       tkn_asid;
 107  116  } smb_token_t;
 108  117  
 109  118  /*
 110  119   * Details required to authenticate a user.
 111  120   * See also: smb_logon_xdr()
 112  121   */
 113  122  typedef struct smb_logon {
 114  123          uint16_t        lg_level;
 115  124          char            *lg_username;   /* requested username */
 116  125          char            *lg_domain;     /* requested domain */
↓ open down ↓ 104 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX