Print this page
NEX-10019 SMB server min_protocol setting
Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
NEX-4083 Upstream changes from illumos 5917 and 5995
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Kevin Crowe <kevin.crowe@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
NEX-3591 SMB3 signing (fix fksmbd)
NEX-3610 CLONE NEX-3591 SMB3 signing
Reviewed by: Gordon Ross <gwr@nexenta.com>
Reviewed by: Dan Fields <dan.fields@nexenta.com>
NEX-1050 enable_smb2 should be smb2_enable (nit)
NEX-1050 enable_smb2 should be smb2_enable
SMB-11 SMB2 message parse & dispatch
SMB-12 SMB2 Negotiate Protocol
SMB-13 SMB2 Session Setup
SMB-14 SMB2 Logoff
SMB-15 SMB2 Tree Connect
SMB-16 SMB2 Tree Disconnect
SMB-17 SMB2 Create
SMB-18 SMB2 Close
SMB-19 SMB2 Flush
SMB-20 SMB2 Read
SMB-21 SMB2 Write
SMB-22 SMB2 Lock/Unlock
SMB-23 SMB2 Ioctl
SMB-24 SMB2 Cancel
SMB-25 SMB2 Echo
SMB-26 SMB2 Query Dir
SMB-27 SMB2 Change Notify
SMB-28 SMB2 Query Info
SMB-29 SMB2 Set Info
SMB-30 SMB2 Oplocks
SMB-53 SMB2 Create Context options
(SMB2 code review cleanup 1, 2, 3)
SMB-72 Improve startup/shudown debug features
SMB-39 Use AF_UNIX pipes for RPC
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/cmd/smbsrv/fksmbd/fksmbd_kmod.c
          +++ new/usr/src/cmd/smbsrv/fksmbd/fksmbd_kmod.c
↓ open down ↓ 2 lines elided ↑ open up ↑
   3    3   * Common Development and Distribution License ("CDDL"), version 1.0.
   4    4   * You may only use this file in accordance with the terms of version
   5    5   * 1.0 of the CDDL.
   6    6   *
   7    7   * A full copy of the text of the CDDL should have accompanied this
   8    8   * source.  A copy of the CDDL is also available via the Internet at
   9    9   * http://www.illumos.org/license/CDDL.
  10   10   */
  11   11  
  12   12  /*
  13      - * Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
       13 + * Copyright 2017 Nexenta Systems, Inc.  All rights reserved.
  14   14   */
  15   15  
  16   16  /*
  17   17   * These replace NODIRECT functions of the same name in
  18   18   * $SRC/lib/smbsrv/libsmb/common/smb_kmod.c including:
  19   19   *      smb_kmod_bind, smb_kmod_ioctl, smb_kmod_isbound,
  20   20   *      smb_kmod_start, smb_kmod_stop, smb_kmod_unbind.
  21   21   *
  22   22   * For all the other smb_kmod_... functions, we can just use the
  23   23   * libsmb code because those all call smb_kmod_ioctl, for which
↓ open down ↓ 38 lines elided ↑ open up ↑
  62   62  fksmbd_adjust_config(smb_ioc_header_t *ioc_hdr)
  63   63  {
  64   64          smb_ioc_cfg_t *ioc = (smb_ioc_cfg_t *)ioc_hdr;
  65   65          char *s;
  66   66  
  67   67          ioc->maxconnections = 10;
  68   68          ioc->maxworkers = 20;
  69   69          smbd_report("maxconnections=%d, maxworkers=%d",
  70   70              ioc->maxconnections, ioc->maxworkers);
  71   71  
       72 +        if ((s = getenv("SMB_MAX_PROTOCOL")) != NULL) {
       73 +                ioc->max_protocol = strtol(s, NULL, 16);
       74 +                smbd_report("max_protocol=0x%x", ioc->max_protocol);
       75 +        }
       76 +
       77 +        if ((s = getenv("SMB_MIN_PROTOCOL")) != NULL) {
       78 +                ioc->min_protocol = strtol(s, NULL, 16);
       79 +                smbd_report("min_protocol=0x%x", ioc->min_protocol);
       80 +        }
       81 +
  72   82          if ((s = getenv("SMB_SIGNING")) != NULL) {
  73   83                  ioc->signing_enable = 0;
  74   84                  ioc->signing_required = 0;
  75   85                  switch (s[0]) {
  76   86                  case 'e':
  77   87                          ioc->signing_enable = 1;
  78   88                          break;
  79   89                  case 'r':
  80   90                          ioc->signing_enable = 1;
  81   91                          ioc->signing_required = 1;
↓ open down ↓ 90 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX