Print this page
NEX-19057 All zfs/nfs/smb threads in door calls to idle idmap
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Roman Strashkin <roman.strashkin@nexenta.com>
1575 untangle libmlrpc from SMB server
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
NEX-1638 Updated DC Locator
 Includes work by: matt.barden@nexenta.com, kevin.crowe@nexenta.com
SMB-108 Should have comments to relate types with their XDR functions
SMB-50 User-mode SMB server
 Includes work by these authors:
 Thomas Keiser <thomas.keiser@nexenta.com>
 Albert Lee <trisk@nexenta.com>


   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 2014 Nexenta Systems, Inc.  All rights reserved.
  24  */
  25 
  26 #ifndef _SMBSRV_SMB_DOOR_H
  27 #define _SMBSRV_SMB_DOOR_H
  28 
  29 #include <sys/door.h>
  30 #include <smbsrv/wintypes.h>
  31 #include <smbsrv/smb_xdr.h>
  32 #include <smbsrv/smb_token.h>
  33 
  34 #ifdef __cplusplus
  35 extern "C" {
  36 #endif
  37 
  38 #define SMBD_DOOR_NAME                  "/var/run/smbd_door"
  39 
  40 #define SMB_DOOR_CALL_RETRIES           3
  41 
  42 /*
  43  * Opcodes for smbd door.
  44  *
  45  * SMB_DR_NULL is the equivalent of the NULL RPC.  It ensures that an
  46  * opcode of zero is not misinterpreted as an operational door call
  47  * and it is available as a test interface.
  48  *
  49  * SMB_DR_ASYNC_RESPONSE delivers the response part of an asynchronous
  50  * request and must be processed as a synchronous request.


  53  */
  54 typedef enum smb_dopcode {
  55         SMB_DR_NULL = 0,
  56         SMB_DR_ASYNC_RESPONSE,
  57         SMB_DR_USER_AUTH_LOGON,
  58         SMB_DR_USER_NONAUTH_LOGON,
  59         SMB_DR_USER_AUTH_LOGOFF,
  60         SMB_DR_LOOKUP_SID,
  61         SMB_DR_LOOKUP_NAME,
  62         SMB_DR_JOIN,
  63         SMB_DR_GET_DCINFO,
  64         SMB_DR_VSS_GET_COUNT,
  65         SMB_DR_VSS_GET_SNAPSHOTS,
  66         SMB_DR_VSS_MAP_GMTTOKEN,
  67         SMB_DR_ADS_FIND_HOST,
  68         SMB_DR_QUOTA_QUERY,
  69         SMB_DR_QUOTA_SET,
  70         SMB_DR_DFS_GET_REFERRALS,
  71         SMB_DR_SHR_HOSTACCESS,
  72         SMB_DR_SHR_EXEC,
  73         SMB_DR_NOTIFY_DC_CHANGED


  74 } smb_dopcode_t;
  75 
  76 struct smb_event;
  77 
  78 typedef struct smb_doorarg {
  79         smb_doorhdr_t           da_hdr;
  80         door_arg_t              da_arg;
  81         xdrproc_t               da_req_xdr;
  82         xdrproc_t               da_rsp_xdr;
  83         void                    *da_req_data;
  84         void                    *da_rsp_data;
  85         smb_dopcode_t           da_opcode;
  86         const char              *da_opname;
  87         struct smb_event        *da_event;
  88         uint32_t                da_flags;
  89 } smb_doorarg_t;
  90 
  91 /*
  92  * Door call return codes.
  93  */




   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 2019 Nexenta Systems, Inc.  All rights reserved.
  24  */
  25 
  26 #ifndef _SMBSRV_SMB_DOOR_H
  27 #define _SMBSRV_SMB_DOOR_H
  28 
  29 #include <sys/door.h>
  30 #include <smb/wintypes.h>
  31 #include <smbsrv/smb_xdr.h>
  32 #include <smbsrv/smb_token.h>
  33 
  34 #ifdef __cplusplus
  35 extern "C" {
  36 #endif
  37 
  38 #define SMBD_DOOR_NAME                  "/var/run/smbd_door"
  39 
  40 #define SMB_DOOR_CALL_RETRIES           3
  41 
  42 /*
  43  * Opcodes for smbd door.
  44  *
  45  * SMB_DR_NULL is the equivalent of the NULL RPC.  It ensures that an
  46  * opcode of zero is not misinterpreted as an operational door call
  47  * and it is available as a test interface.
  48  *
  49  * SMB_DR_ASYNC_RESPONSE delivers the response part of an asynchronous
  50  * request and must be processed as a synchronous request.


  53  */
  54 typedef enum smb_dopcode {
  55         SMB_DR_NULL = 0,
  56         SMB_DR_ASYNC_RESPONSE,
  57         SMB_DR_USER_AUTH_LOGON,
  58         SMB_DR_USER_NONAUTH_LOGON,
  59         SMB_DR_USER_AUTH_LOGOFF,
  60         SMB_DR_LOOKUP_SID,
  61         SMB_DR_LOOKUP_NAME,
  62         SMB_DR_JOIN,
  63         SMB_DR_GET_DCINFO,
  64         SMB_DR_VSS_GET_COUNT,
  65         SMB_DR_VSS_GET_SNAPSHOTS,
  66         SMB_DR_VSS_MAP_GMTTOKEN,
  67         SMB_DR_ADS_FIND_HOST,
  68         SMB_DR_QUOTA_QUERY,
  69         SMB_DR_QUOTA_SET,
  70         SMB_DR_DFS_GET_REFERRALS,
  71         SMB_DR_SHR_HOSTACCESS,
  72         SMB_DR_SHR_EXEC,
  73         SMB_DR_NOTIFY_DC_CHANGED,
  74         SMB_DR_LOOKUP_LSID,
  75         SMB_DR_LOOKUP_LNAME
  76 } smb_dopcode_t;
  77 
  78 struct smb_event;
  79 
  80 typedef struct smb_doorarg {
  81         smb_doorhdr_t           da_hdr;
  82         door_arg_t              da_arg;
  83         xdrproc_t               da_req_xdr;
  84         xdrproc_t               da_rsp_xdr;
  85         void                    *da_req_data;
  86         void                    *da_rsp_data;
  87         smb_dopcode_t           da_opcode;
  88         const char              *da_opname;
  89         struct smb_event        *da_event;
  90         uint32_t                da_flags;
  91 } smb_doorarg_t;
  92 
  93 /*
  94  * Door call return codes.
  95  */