Print this page
NEX-17095 illumos 8935 SMB ioctl fixes incomplete
8935 SMB ioctl fixes incomplete
Reviewed by: Alex Wilson <alex.wilson@joyent.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Rui Loura <rui.loura@joyent.com>
Reviewed by: Garrett D'Amore <garrett@damore.org>
Reviewed by: Dominik Hassler <hasslerd@gmx.li>
Approved by: Garrett D'Amore <garrett@damore.org>
NEX-10019 SMB server min_protocol setting
Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
NEX-5273 SMB 3 Encryption
Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Reviewed by: Roman Strashkin <roman.strashkin@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-3611 CLONE NEX-3550 Replace smb2_enable with max_protocol
Reviewed by: Yuri Pankov <Yuri.Pankov@nexenta.com>
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-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>
re #6813 rb1757 port 2976 Child folder visibility through shares


   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  23  * Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
  24  * Copyright 2017 Joyent, Inc.
  25  */
  26 
  27 #ifndef _SMB_IOCTL_H_
  28 #define _SMB_IOCTL_H_
  29 
  30 #ifdef  __cplusplus
  31 extern "C" {
  32 #endif
  33 
  34 #include <sys/types.h>
  35 #include <sys/param.h>
  36 #include <smbsrv/smbinfo.h>
  37 
  38 #define SMB_IOC_VERSION         0x534D4201      /* SMB1 */
  39 
  40 #define SMB_IOC_BASE            (('S' << 16) | ('B' << 8))
  41 
  42 #define SMB_IOC_CONFIG          _IOW(SMB_IOC_BASE, 1, int)
  43 #define SMB_IOC_START           _IOW(SMB_IOC_BASE, 2, int)


 155         uint32_t        uniqid;
 156 } smb_ioc_fileid_t;
 157 
 158 /* See also: smb_kmod_cfg_t */
 159 typedef struct smb_ioc_cfg {
 160         smb_ioc_header_t hdr;
 161         uint32_t        maxworkers;
 162         uint32_t        maxconnections;
 163         uint32_t        keepalive;
 164         int32_t         restrict_anon;
 165         int32_t         signing_enable;
 166         int32_t         signing_required;
 167         int32_t         oplock_enable;
 168         int32_t         sync_enable;
 169         int32_t         secmode;
 170         int32_t         netbios_enable;
 171         int32_t         ipv6_enable;
 172         int32_t         print_enable;
 173         int32_t         traverse_mounts;
 174         uint32_t        max_protocol;


 175         uint32_t        exec_flags;
 176         uint32_t        negtok_len;
 177         smb_version_t   version;
 178         uint16_t        initial_credits;
 179         uint16_t        maximum_credits;
 180         /* SMB negotiate protocol response. */
 181         uuid_t          machine_uuid;
 182         uchar_t         negtok[SMB_PI_MAX_NEGTOK];
 183         char            native_os[SMB_PI_MAX_NATIVE_OS];
 184         char            native_lm[SMB_PI_MAX_LANMAN];
 185         char            nbdomain[NETBIOS_NAME_SZ];
 186         char            fqdn[SMB_PI_MAX_DOMAIN];
 187         char            hostname[SMB_PI_MAX_HOST];
 188         char            system_comment[SMB_PI_MAX_COMMENT];
 189 } smb_ioc_cfg_t;
 190 
 191 typedef union smb_ioc {
 192         smb_ioc_header_t        ioc_hdr;
 193         smb_ioc_gmt_t           ioc_gmt;
 194         smb_ioc_cfg_t           ioc_cfg;




   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  23  * Copyright 2017 Nexenta Systems, Inc.  All rights reserved.
  24  * Copyright 2017 Joyent, Inc.
  25  */
  26 
  27 #ifndef _SMB_IOCTL_H_
  28 #define _SMB_IOCTL_H_
  29 
  30 #ifdef  __cplusplus
  31 extern "C" {
  32 #endif
  33 
  34 #include <sys/types.h>
  35 #include <sys/param.h>
  36 #include <smbsrv/smbinfo.h>
  37 
  38 #define SMB_IOC_VERSION         0x534D4201      /* SMB1 */
  39 
  40 #define SMB_IOC_BASE            (('S' << 16) | ('B' << 8))
  41 
  42 #define SMB_IOC_CONFIG          _IOW(SMB_IOC_BASE, 1, int)
  43 #define SMB_IOC_START           _IOW(SMB_IOC_BASE, 2, int)


 155         uint32_t        uniqid;
 156 } smb_ioc_fileid_t;
 157 
 158 /* See also: smb_kmod_cfg_t */
 159 typedef struct smb_ioc_cfg {
 160         smb_ioc_header_t hdr;
 161         uint32_t        maxworkers;
 162         uint32_t        maxconnections;
 163         uint32_t        keepalive;
 164         int32_t         restrict_anon;
 165         int32_t         signing_enable;
 166         int32_t         signing_required;
 167         int32_t         oplock_enable;
 168         int32_t         sync_enable;
 169         int32_t         secmode;
 170         int32_t         netbios_enable;
 171         int32_t         ipv6_enable;
 172         int32_t         print_enable;
 173         int32_t         traverse_mounts;
 174         uint32_t        max_protocol;
 175         uint32_t        min_protocol;
 176         uint32_t        encrypt;
 177         uint32_t        exec_flags;
 178         uint32_t        negtok_len;
 179         smb_version_t   version;
 180         uint16_t        initial_credits;
 181         uint16_t        maximum_credits;
 182         /* SMB negotiate protocol response. */
 183         uuid_t          machine_uuid;
 184         uchar_t         negtok[SMB_PI_MAX_NEGTOK];
 185         char            native_os[SMB_PI_MAX_NATIVE_OS];
 186         char            native_lm[SMB_PI_MAX_LANMAN];
 187         char            nbdomain[NETBIOS_NAME_SZ];
 188         char            fqdn[SMB_PI_MAX_DOMAIN];
 189         char            hostname[SMB_PI_MAX_HOST];
 190         char            system_comment[SMB_PI_MAX_COMMENT];
 191 } smb_ioc_cfg_t;
 192 
 193 typedef union smb_ioc {
 194         smb_ioc_header_t        ioc_hdr;
 195         smb_ioc_gmt_t           ioc_gmt;
 196         smb_ioc_cfg_t           ioc_cfg;