Print this page
NEX-18907 File Access Auditing does not work with SMB Kerberos authentication
Review by: Gordon Ross <gordon.ross@nexenta.com>
Review by: Evan Layton <evan.layton@nexenta.com>
NEX-2346 SMB server debug logging cleanup after NEX-2314
NEX-2286 smbadm join error messages are uninformative
NEX-1810 extended security Kerberos (inbound)
SMB-136 Snapshots not visible in Windows previous versions
SMB-70 Hang during boot after SMB-50 (fix elfchk noise)
SMB-56 extended security NTLMSSP, inbound
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>
re #6812 rb1753 backport illumos 1604 smbd print_enable doesn't really work
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/cmd/smbsrv/smbd/smbd.h
+++ new/usr/src/cmd/smbsrv/smbd/smbd.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
|
↓ 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 /*
23 23 * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
24 - * Copyright 2014 Nexenta Systems, Inc. All rights reserved.
24 + * Copyright 2018 Nexenta Systems, Inc. All rights reserved.
25 25 */
26 26
27 27 #ifndef _SMBD_H
28 28 #define _SMBD_H
29 29
30 30 #ifdef __cplusplus
31 31 extern "C" {
32 32 #endif
33 33
34 34 #include <sys/types.h>
35 35 #include <thread.h>
36 36 #include <synch.h>
37 37 #include <smbsrv/smb_ioctl.h>
38 38 #include <smbsrv/smb_token.h>
39 39 #include <smbsrv/libsmb.h>
40 40 #include <smbsrv/libmlsvc.h>
41 41
42 42 void smbd_report(const char *fmt, ...);
43 43 int smbd_pipesvc_start(void);
44 44 void smbd_pipesvc_stop(void);
45 45 int smbd_share_start(void);
46 46 void smbd_share_stop(void);
47 47 int smbd_nicmon_start(const char *);
48 48 void smbd_nicmon_stop(void);
49 49 int smbd_nicmon_refresh(void);
|
↓ open down ↓ |
15 lines elided |
↑ open up ↑ |
50 50 int smbd_dc_monitor_init(void);
51 51 void smbd_dc_monitor_refresh(void);
52 52 smb_token_t *smbd_user_auth_logon(smb_logon_t *);
53 53 void smbd_user_nonauth_logon(uint32_t);
54 54 void smbd_user_auth_logoff(uint32_t);
55 55 void smbd_join(smb_joininfo_t *, smb_joinres_t *);
56 56 void smbd_set_secmode(int);
57 57 boolean_t smbd_online(void);
58 58 void smbd_online_wait(const char *);
59 59 void smbd_get_authconf(smb_kmod_cfg_t *);
60 +boolean_t smbd_logon_audit(smb_token_t *, smb_inaddr_t *, char *, char *);
60 61
61 62 void smbd_spool_start(void);
62 63 void smbd_spool_stop(void);
63 64 int smbd_cups_init(void);
64 65 void smbd_cups_fini(void);
65 66 void smbd_load_printers(void);
66 67
67 68 int smbd_vss_get_count(const char *, uint32_t *);
68 69 void smbd_vss_get_snapshots(const char *, uint32_t, uint32_t *,
69 70 uint32_t *, char **);
70 71 int smbd_vss_map_gmttoken(const char *, char *, time_t, char *);
71 72
72 73 typedef struct smbd {
73 74 const char *s_version; /* smbd version string */
74 75 const char *s_pname; /* basename to use for messages */
75 76 pid_t s_pid; /* process-ID of current daemon */
76 77 uid_t s_uid; /* UID of current daemon */
77 78 gid_t s_gid; /* GID of current daemon */
78 79 int s_fg; /* Run in foreground */
79 80 int s_debug; /* Enable debug output */
80 81 int s_dbg_stop; /* stop for debugger attach */
81 82 boolean_t s_initialized;
82 83 boolean_t s_shutting_down; /* shutdown control */
83 84 volatile uint_t s_refreshes;
84 85 boolean_t s_kbound; /* B_TRUE if bound to kernel */
85 86 int s_authsvc_sock;
86 87 int s_door_lmshr;
87 88 int s_door_srv;
88 89 int s_door_opipe;
89 90 int s_secmode; /* Current security mode */
90 91 char s_site[MAXHOSTNAMELEN];
91 92 smb_inaddr_t s_pdc;
92 93 boolean_t s_pdc_changed;
93 94 pthread_t s_refresh_tid;
94 95 pthread_t s_authsvc_tid;
95 96 pthread_t s_localtime_tid;
96 97 pthread_t s_spool_tid;
97 98 pthread_t s_dc_monitor_tid;
98 99 boolean_t s_nbt_listener_running;
99 100 boolean_t s_tcp_listener_running;
100 101 pthread_t s_nbt_listener_id;
101 102 pthread_t s_tcp_listener_id;
102 103 boolean_t s_fatal_error;
103 104 } smbd_t;
104 105
105 106 extern smbd_t smbd;
106 107
107 108 #define SMBD_LOG_MSGSIZE 256
108 109
109 110 #define SMBD_DOOR_NAMESZ 16
110 111
111 112 typedef struct smbd_door {
112 113 mutex_t sd_mutex;
113 114 cond_t sd_cv;
114 115 uint32_t sd_ncalls;
115 116 char sd_name[SMBD_DOOR_NAMESZ];
116 117 } smbd_door_t;
117 118
118 119 #define SMBD_ARG_MAGIC 0x53415247 /* 'SARG' */
119 120
120 121 /*
121 122 * Parameter for door operations.
122 123 */
123 124 typedef struct smbd_arg {
124 125 uint32_t magic;
125 126 list_node_t lnd;
126 127 smb_doorhdr_t hdr;
127 128 const char *opname;
128 129 char *data;
129 130 size_t datalen;
130 131 char *rbuf;
131 132 size_t rsize;
132 133 boolean_t response_ready;
133 134 boolean_t response_abort;
134 135 uint32_t status;
135 136 } smbd_arg_t;
136 137
137 138 int smbd_door_start(void);
138 139 void smbd_door_stop(void);
139 140 void smbd_door_init(smbd_door_t *, const char *);
140 141 void smbd_door_fini(smbd_door_t *);
141 142 void smbd_door_enter(smbd_door_t *);
142 143 void smbd_door_return(smbd_door_t *, char *, size_t, door_desc_t *, uint_t);
143 144
144 145 void *smbd_door_dispatch_op(void *);
145 146
146 147 int smbd_authsvc_start(void);
147 148 void smbd_authsvc_stop(void);
148 149
149 150 /* For fksmbd */
150 151 void fksmbd_init(void);
151 152 int fksmbd_door_dispatch(smb_doorarg_t *);
152 153
153 154 #ifdef __cplusplus
154 155 }
155 156 #endif
156 157
157 158 #endif /* _SMBD_H */
|
↓ open down ↓ |
88 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX