Print this page
12513 SMB 3.1.1 support for server
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/lib/smbsrv/libsmb/common/libsmb.h
+++ new/usr/src/lib/smbsrv/libsmb/common/libsmb.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
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
↓ 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 /*
23 23 * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
24 24 * Copyright 2019 Nexenta Systems, Inc. All rights reserved.
25 + * Copyright 2020 RackTop Systems, Inc.
25 26 */
26 27
27 28 #ifndef _LIBSMB_H
28 29 #define _LIBSMB_H
29 30
30 31 #ifdef __cplusplus
31 32 extern "C" {
32 33 #endif
33 34
34 35 #include <sys/types.h>
35 36 #include <sys/inttypes.h>
36 37 #include <sys/list.h>
37 38 #include <sys/avl.h>
38 39 #include <arpa/inet.h>
39 40 #include <net/if.h> /* LIFNAMSIZ */
40 41 #include <netdb.h>
41 42 #include <stdlib.h>
42 43 #include <libscf.h>
43 44 #include <libshare.h>
44 45 #include <uuid/uuid.h>
45 46 #include <synch.h>
46 47 #include <stdarg.h>
47 48
48 49 #include <smb/nterror.h>
49 50 #include <smb/ntstatus.h>
50 51 #include <smb/wintypes.h>
51 52
52 53 #include <smbsrv/string.h>
53 54 #include <smbsrv/smb_idmap.h>
54 55 #include <smbsrv/netbios.h>
55 56 #include <smbsrv/smb_share.h>
56 57 #include <smbsrv/smb_door.h>
57 58 #include <smbsrv/alloc.h>
58 59 #include <smbsrv/hash_table.h>
59 60 #include <smbsrv/msgbuf.h>
60 61 #include <smbsrv/smb_xdr.h>
61 62 #include <smbsrv/smbinfo.h>
62 63 #include <smbsrv/ntifs.h>
63 64
64 65 #define SMB_VARSMB_DIR "/var/smb"
65 66 #define SMB_VARRUN_DIR "/var/run/smb"
66 67 #define SMB_CCACHE_FILE "ccache"
67 68 #define SMB_CCACHE_PATH SMB_VARRUN_DIR "/" SMB_CCACHE_FILE
68 69
69 70
70 71 /* Max value length of all SMB properties */
71 72 #define MAX_VALUE_BUFLEN 512
72 73
73 74 #define SMBD_FMRI_PREFIX "network/smb/server"
74 75 #define SMBD_DEFAULT_INSTANCE_FMRI "svc:/network/smb/server:default"
75 76 #define SMBD_PG_NAME "smbd"
76 77 #define SMBD_PROTECTED_PG_NAME "read"
77 78 #define SMBD_EXEC_PG_NAME "exec"
78 79
79 80 #define SMBD_SMF_OK 0
80 81 #define SMBD_SMF_NO_MEMORY 1 /* no memory for data structures */
81 82 #define SMBD_SMF_SYSTEM_ERR 2 /* system error, use errno */
82 83 #define SMBD_SMF_NO_PERMISSION 3 /* no permission for operation */
83 84 #define SMBD_SMF_INVALID_ARG 4
84 85
85 86 #define SCH_STATE_UNINIT 0
86 87 #define SCH_STATE_INITIALIZING 1
87 88 #define SCH_STATE_INIT 2
88 89
89 90 typedef struct smb_scfhandle {
90 91 scf_handle_t *scf_handle;
91 92 int scf_state;
92 93 scf_service_t *scf_service;
93 94 scf_scope_t *scf_scope;
94 95 scf_transaction_t *scf_trans;
95 96 scf_transaction_entry_t *scf_entry;
96 97 scf_propertygroup_t *scf_pg;
97 98 scf_instance_t *scf_instance;
98 99 scf_iter_t *scf_inst_iter;
99 100 scf_iter_t *scf_pg_iter;
100 101 } smb_scfhandle_t;
101 102
102 103 /*
103 104 * CIFS Configuration Management
104 105 */
105 106 typedef enum {
106 107 SMB_CI_VERSION = 0,
107 108 SMB_CI_OPLOCK_ENABLE,
108 109
109 110 SMB_CI_AUTOHOME_MAP,
110 111
111 112 SMB_CI_DOMAIN_SID,
112 113 SMB_CI_DOMAIN_MEMB,
113 114 SMB_CI_DOMAIN_NAME,
114 115 SMB_CI_DOMAIN_FQDN,
115 116 SMB_CI_DOMAIN_FOREST,
116 117 SMB_CI_DOMAIN_GUID,
117 118 SMB_CI_DOMAIN_SRV,
118 119
119 120 SMB_CI_WINS_SRV1,
120 121 SMB_CI_WINS_SRV2,
121 122 SMB_CI_WINS_EXCL,
122 123
123 124 SMB_CI_MAX_WORKERS,
124 125 SMB_CI_MAX_CONNECTIONS,
125 126 SMB_CI_KEEPALIVE,
126 127 SMB_CI_RESTRICT_ANON,
127 128
128 129 SMB_CI_SIGNING_ENABLE,
129 130 SMB_CI_SIGNING_REQD,
130 131
131 132 SMB_CI_SYNC_ENABLE,
132 133
133 134 SMB_CI_SECURITY,
134 135 SMB_CI_NETBIOS_ENABLE,
135 136 SMB_CI_NBSCOPE,
136 137 SMB_CI_SYS_CMNT,
137 138 SMB_CI_LM_LEVEL,
138 139
139 140 SMB_CI_ADS_SITE,
140 141
141 142 SMB_CI_DYNDNS_ENABLE,
142 143
143 144 SMB_CI_MACHINE_PASSWD,
144 145 SMB_CI_MACHINE_UUID,
145 146 SMB_CI_KPASSWD_SRV,
146 147 SMB_CI_KPASSWD_DOMAIN,
147 148 SMB_CI_KPASSWD_SEQNUM,
148 149 SMB_CI_NETLOGON_SEQNUM,
149 150 SMB_CI_IPV6_ENABLE,
150 151 SMB_CI_PRINT_ENABLE,
151 152 SMB_CI_MAP,
152 153 SMB_CI_UNMAP,
↓ open down ↓ |
118 lines elided |
↑ open up ↑ |
153 154 SMB_CI_DISPOSITION,
154 155 SMB_CI_DFS_STDROOT_NUM,
155 156 SMB_CI_TRAVERSE_MOUNTS,
156 157 SMB_CI_SMB2_ENABLE_OLD, /* obsolete */
157 158 SMB_CI_INITIAL_CREDITS,
158 159 SMB_CI_MAXIMUM_CREDITS,
159 160 SMB_CI_MAX_PROTOCOL,
160 161 SMB_CI_ENCRYPT,
161 162 SMB_CI_MIN_PROTOCOL,
162 163 SMB_CI_BYPASS_TRAVERSE_CHECKING,
164 + SMB_CI_ENCRYPT_CIPHER,
163 165
164 166 SMB_CI_MAX
165 167 } smb_cfg_id_t;
166 168
167 169 /* SMF helper functions */
168 170 extern smb_scfhandle_t *smb_smf_scf_init(char *);
169 171 extern void smb_smf_scf_fini(smb_scfhandle_t *);
170 172 extern int smb_smf_start_transaction(smb_scfhandle_t *);
171 173 extern int smb_smf_end_transaction(smb_scfhandle_t *);
172 174 extern int smb_smf_set_string_property(smb_scfhandle_t *, char *, char *);
173 175 extern int smb_smf_get_string_property(smb_scfhandle_t *, char *,
174 176 char *, size_t);
175 177 extern int smb_smf_set_integer_property(smb_scfhandle_t *, char *, int64_t);
176 178 extern int smb_smf_get_integer_property(smb_scfhandle_t *, char *, int64_t *);
177 179 extern int smb_smf_set_boolean_property(smb_scfhandle_t *, char *, uint8_t);
178 180 extern int smb_smf_get_boolean_property(smb_scfhandle_t *, char *, uint8_t *);
179 181 extern int smb_smf_set_opaque_property(smb_scfhandle_t *, char *,
180 182 void *, size_t);
181 183 extern int smb_smf_get_opaque_property(smb_scfhandle_t *, char *,
182 184 void *, size_t);
183 185 extern int smb_smf_create_service_pgroup(smb_scfhandle_t *, char *);
184 186 extern int smb_smf_delete_property(smb_scfhandle_t *, char *);
185 187 extern int smb_smf_restart_service(void);
186 188 extern int smb_smf_maintenance_mode(void);
187 189
188 190 /* ZFS interface */
189 191 struct libzfs_handle;
190 192 int smb_getdataset(struct libzfs_handle *, const char *, char *, size_t);
191 193
192 194 /* Configuration management functions */
193 195 extern int smb_config_get(smb_cfg_id_t, char *, int);
194 196 extern char *smb_config_getname(smb_cfg_id_t);
195 197 extern int smb_config_getstr(smb_cfg_id_t, char *, int);
196 198 extern int smb_config_getnum(smb_cfg_id_t, int64_t *);
197 199 extern boolean_t smb_config_getbool(smb_cfg_id_t);
198 200
199 201 extern int smb_config_set(smb_cfg_id_t, char *);
200 202 extern int smb_config_setstr(smb_cfg_id_t, char *);
201 203 extern int smb_config_setnum(smb_cfg_id_t, int64_t);
202 204 extern int smb_config_setbool(smb_cfg_id_t, boolean_t);
203 205
204 206 extern boolean_t smb_config_get_ads_enable(void);
205 207 extern int smb_config_get_debug(void);
206 208 extern uint8_t smb_config_get_fg_flag(void);
207 209 extern char *smb_config_get_localsid(void);
208 210 extern int smb_config_get_localuuid(uuid_t);
209 211 extern int smb_config_secmode_fromstr(char *);
210 212 extern char *smb_config_secmode_tostr(int);
211 213 extern int smb_config_get_secmode(void);
212 214 extern int smb_config_set_secmode(int);
213 215 extern int smb_config_set_idmap_domain(char *);
↓ open down ↓ |
41 lines elided |
↑ open up ↑ |
214 216 extern int smb_config_refresh_idmap(void);
215 217 extern int smb_config_getip(smb_cfg_id_t, smb_inaddr_t *);
216 218 extern void smb_config_get_version(smb_version_t *);
217 219 uint32_t smb_config_get_execinfo(char *, char *, size_t);
218 220 extern void smb_config_get_negtok(uchar_t *, uint32_t *);
219 221
220 222 extern int smb_config_check_protocol(char *);
221 223 extern uint32_t smb_config_get_max_protocol(void);
222 224 extern uint32_t smb_config_get_min_protocol(void);
223 225 extern void smb_config_upgrade(void);
226 +extern uint16_t smb31_config_get_encrypt_cipher(void);
224 227
225 228 extern smb_cfg_val_t smb_config_get_require(smb_cfg_id_t);
226 229
227 230 extern void smb_load_kconfig(smb_kmod_cfg_t *kcfg);
228 231 extern uint32_t smb_crc_gen(uint8_t *, size_t);
229 232
230 233 extern boolean_t smb_match_netlogon_seqnum(void);
231 234 extern int smb_setdomainprops(char *, char *, char *);
232 235 extern void smb_update_netlogon_seqnum(void);
233 236
234 237 /* maximum password length on Windows 2000 and above */
235 238 #define SMB_PASSWD_MAXLEN 127
236 239 #define SMB_USERNAME_MAXLEN 40
237 240
238 241 /* See also: smb_joininfo_xdr() */
239 242 typedef struct smb_joininfo {
240 243 char domain_name[MAXHOSTNAMELEN];
241 244 char domain_username[SMB_USERNAME_MAXLEN + 1];
242 245 char domain_passwd[SMB_PASSWD_MAXLEN + 1];
243 246 uint32_t mode;
244 247 } smb_joininfo_t;
245 248
246 249 /* See also: smb_joinres_xdr() */
247 250 typedef struct smb_joinres {
248 251 uint32_t status;
249 252 int join_err;
250 253 char dc_name[MAXHOSTNAMELEN];
251 254 } smb_joinres_t;
252 255
253 256 /* APIs to communicate with SMB daemon via door calls */
254 257 int smb_join(smb_joininfo_t *, smb_joinres_t *info);
255 258 bool_t smb_joininfo_xdr(XDR *, smb_joininfo_t *);
256 259 bool_t smb_joinres_xdr(XDR *, smb_joinres_t *);
257 260 boolean_t smb_find_ads_server(char *, char *, int);
258 261 void smb_notify_dc_changed(void);
259 262
260 263 extern void smb_config_getdomaininfo(char *, char *, char *, char *, char *);
261 264 extern void smb_config_setdomaininfo(char *, char *, char *, char *, char *);
262 265 extern uint32_t smb_get_dcinfo(char *, uint32_t, smb_inaddr_t *);
263 266
264 267 /*
265 268 * buffer context structure. This is used to keep track of the buffer
266 269 * context.
267 270 *
268 271 * basep: points to the beginning of the buffer
269 272 * curp: points to the current offset
270 273 * endp: points to the limit of the buffer
271 274 */
272 275 typedef struct {
273 276 unsigned char *basep;
274 277 unsigned char *curp;
275 278 unsigned char *endp;
276 279 } smb_ctxbuf_t;
277 280
278 281 extern int smb_ctxbuf_init(smb_ctxbuf_t *ctx, unsigned char *buf,
279 282 size_t buflen);
280 283 extern int smb_ctxbuf_len(smb_ctxbuf_t *ctx);
281 284 extern int smb_ctxbuf_printf(smb_ctxbuf_t *ctx, const char *fmt, ...);
282 285
283 286 void smb_idmap_check(const char *, idmap_stat);
284 287
285 288 /* Miscellaneous functions */
286 289 extern void hexdump(unsigned char *, int);
287 290 extern size_t bintohex(const char *, size_t, char *, size_t);
288 291 extern size_t hextobin(const char *, size_t, char *, size_t);
289 292 extern char *strstrip(char *, const char *);
290 293 extern char *strtrim(char *, const char *);
291 294 extern char *trim_whitespace(char *);
292 295 extern void randomize(char *, unsigned);
293 296 extern void rand_hash(unsigned char *, size_t, unsigned char *, size_t);
294 297
295 298 extern int smb_getdomainname(char *, size_t);
296 299 extern int smb_getfqdomainname(char *, size_t);
297 300
298 301 typedef enum smb_caseconv {
299 302 SMB_CASE_PRESERVE = 0,
300 303 SMB_CASE_UPPER,
301 304 SMB_CASE_LOWER
302 305 } smb_caseconv_t;
303 306
304 307 extern int smb_gethostname(char *, size_t, smb_caseconv_t);
305 308 extern int smb_getfqhostname(char *, size_t);
306 309 extern int smb_getnetbiosname(char *, size_t);
307 310 extern struct hostent *smb_gethostbyname(const char *, int *);
308 311 extern struct hostent *smb_gethostbyaddr(const char *, int, int, int *);
309 312
310 313 #define SMB_SAMACCT_MAXLEN (NETBIOS_NAME_SZ + 1)
311 314 extern int smb_getsamaccount(char *, size_t);
312 315
313 316 extern int smb_get_nameservers(smb_inaddr_t *, int);
314 317 extern void smb_tonetbiosname(char *, char *, char);
315 318
316 319 extern int smb_chk_hostaccess(smb_inaddr_t *, char *);
317 320
318 321 extern int smb_getnameinfo(smb_inaddr_t *, char *, int, int);
319 322
320 323 void smb_trace(const char *s);
321 324 void smb_tracef(const char *fmt, ...);
322 325
323 326 const char *xlate_nt_status(unsigned int);
324 327
325 328 void libsmb_redirect_syslog(__FILE_TAG *fp, int priority);
326 329
327 330 /*
328 331 * Authentication
329 332 */
330 333
331 334 #define SMBAUTH_LM_MAGIC_STR "KGS!@#$%"
332 335
333 336 #define SMBAUTH_HASH_SZ 16 /* also LM/NTLM/NTLMv2 Hash size */
334 337 #define SMBAUTH_LM_RESP_SZ 24 /* also NTLM Response size */
335 338 #define SMBAUTH_LM_PWD_SZ 14 /* LM password size */
336 339 #define SMBAUTH_CHAL_SZ 8 /* both LMv2 and NTLMv2 */
337 340 #define SMBAUTH_SESSION_KEY_SZ SMBAUTH_HASH_SZ
338 341 #define SMBAUTH_HEXHASH_SZ (SMBAUTH_HASH_SZ * 2)
339 342
340 343 #define SMBAUTH_FAILURE 1
341 344 #define SMBAUTH_SUCCESS 0
342 345 #define MD_DIGEST_LEN 16
343 346
344 347 /*
345 348 * Name Types
346 349 *
347 350 * The list of names near the end of the data blob (i.e. the ndb_names
348 351 * field of the smb_auth_data_blob_t data structure) can be classify into
349 352 * the following types:
350 353 *
351 354 * 0x0000 Indicates the end of the list.
352 355 * 0x0001 The name is a NetBIOS machine name (e.g. server name)
353 356 * 0x0002 The name is an NT Domain NetBIOS name.
354 357 * 0x0003 The name is the server's DNS hostname.
355 358 * 0x0004 The name is a W2K Domain name (a DNS name).
356 359 */
357 360 #define SMBAUTH_NAME_TYPE_LIST_END 0x0000
358 361 #define SMBAUTH_NAME_TYPE_SERVER_NETBIOS 0x0001
359 362 #define SMBAUTH_NAME_TYPE_DOMAIN_NETBIOS 0x0002
360 363 #define SMBAUTH_NAME_TYPE_SERVER_DNS 0x0003
361 364 #define SMBAUTH_NAME_TYPE_DOMAIN_DNS 0x0004
362 365
363 366 /*
364 367 * smb_auth_name_entry_t
365 368 *
366 369 * Each name entry in the data blob consists of the following 3 fields:
367 370 *
368 371 * nne_type - name type
369 372 * nne_len - the length of the name
370 373 * nne_name - the name, in uppercase UCS-2LE Unicode format
371 374 */
372 375 typedef struct smb_auth_name_entry {
373 376 unsigned short nne_type;
374 377 unsigned short nne_len;
375 378 smb_wchar_t nne_name[SMB_PI_MAX_DOMAIN * 2];
376 379 } smb_auth_name_entry_t;
377 380
378 381 /*
379 382 * smb_auth_data_blob
380 383 *
381 384 * The format of this NTLMv2 data blob structure is as follow:
382 385 *
383 386 * - Blob Signature 0x01010000 (4 bytes)
384 387 * - Reserved (0x00000000) (4 bytes)
385 388 * - Timestamp Little-endian, 64-bit signed value representing
386 389 * the number of tenths of a microsecond since January 1, 1601.
387 390 * (8 bytes)
388 391 * - Client Challenge (8 bytes)
389 392 * - Unknown1 (4 bytes)
390 393 * - List of Target Information (variable length)
391 394 * - Unknown2 (4 bytes)
392 395 */
393 396 typedef struct smb_auth_data_blob {
394 397 unsigned char ndb_signature[4];
395 398 unsigned char ndb_reserved[4];
396 399 uint64_t ndb_timestamp;
397 400 unsigned char ndb_clnt_challenge[SMBAUTH_CHAL_SZ];
398 401 unsigned char ndb_unknown[4];
399 402 smb_auth_name_entry_t ndb_names[2];
400 403 unsigned char ndb_unknown2[4];
401 404 } smb_auth_data_blob_t;
402 405
403 406 #define SMBAUTH_BLOB_MAXLEN (sizeof (smb_auth_data_blob_t))
404 407 #define SMBAUTH_CI_MAXLEN SMBAUTH_LM_RESP_SZ
405 408 #define SMBAUTH_CS_MAXLEN (SMBAUTH_BLOB_MAXLEN + SMBAUTH_HASH_SZ)
406 409
407 410 /*
408 411 * smb_auth_info_t
409 412 *
410 413 * The structure contains all the authentication information
411 414 * needed for the preparaton of the SMBSessionSetupAndx request
412 415 * and the user session key.
413 416 *
414 417 * hash - NTLM hash
415 418 * hash_v2 - NTLMv2 hash
416 419 * ci_len - the length of the case-insensitive password
417 420 * ci - case-insensitive password
418 421 * (If NTLMv2 authentication mechanism is used, it
419 422 * represents the LMv2 response. Otherwise, it
420 423 * is empty.)
421 424 * cs_len - the length of the case-sensitive password
422 425 * cs - case-sensitive password
423 426 * (If NTLMv2 authentication mechanism is used, it
424 427 * represents the NTLMv2 response. Otherwise, it
425 428 * represents the NTLM response.)
426 429 * data_blob - NTLMv2 data blob
427 430 */
428 431 typedef struct smb_auth_info {
429 432 unsigned char hash[SMBAUTH_HASH_SZ];
430 433 unsigned char hash_v2[SMBAUTH_HASH_SZ];
431 434 unsigned short ci_len;
432 435 unsigned char ci[SMBAUTH_CI_MAXLEN];
433 436 unsigned short cs_len;
434 437 unsigned char cs[SMBAUTH_CS_MAXLEN];
435 438 int lmcompatibility_lvl;
436 439 smb_auth_data_blob_t data_blob;
437 440 } smb_auth_info_t;
438 441
439 442 /*
440 443 * SMB password management
441 444 */
442 445
443 446 #define SMB_PWF_LM 0x01 /* LM hash is present */
444 447 #define SMB_PWF_NT 0x02 /* NT hash is present */
445 448 #define SMB_PWF_DISABLE 0x04 /* Account is disabled */
446 449
447 450 typedef struct smb_passwd {
448 451 uid_t pw_uid;
449 452 uint32_t pw_flags;
450 453 char pw_name[SMB_USERNAME_MAXLEN];
451 454 uint8_t pw_lmhash[SMBAUTH_HASH_SZ];
452 455 uint8_t pw_nthash[SMBAUTH_HASH_SZ];
453 456 } smb_passwd_t;
454 457
455 458 /*
456 459 * Control flags passed to smb_pwd_setcntl
457 460 */
458 461 #define SMB_PWC_DISABLE 0x01
459 462 #define SMB_PWC_ENABLE 0x02
460 463 #define SMB_PWC_NOLM 0x04
461 464 #define SMB_PWC_DELETE 0x08
462 465
463 466 #define SMB_PWE_SUCCESS 0
464 467 #define SMB_PWE_USER_UNKNOWN 1
465 468 #define SMB_PWE_USER_DISABLE 2
466 469 #define SMB_PWE_CLOSE_FAILED 3
467 470 #define SMB_PWE_OPEN_FAILED 4
468 471 #define SMB_PWE_WRITE_FAILED 6
469 472 #define SMB_PWE_UPDATE_FAILED 7
470 473 #define SMB_PWE_STAT_FAILED 8
471 474 #define SMB_PWE_BUSY 9
472 475 #define SMB_PWE_DENIED 10
473 476 #define SMB_PWE_SYSTEM_ERROR 11
474 477 #define SMB_PWE_INVALID_PARAM 12
475 478 #define SMB_PWE_NO_MEMORY 13
476 479 #define SMB_PWE_MAX 14
477 480
478 481 typedef struct smb_pwditer {
479 482 void *spi_next;
480 483 } smb_pwditer_t;
481 484
482 485 typedef struct smb_luser {
483 486 char *su_name;
484 487 char *su_fullname;
485 488 char *su_desc;
486 489 uint32_t su_rid;
487 490 uint32_t su_ctrl;
488 491 } smb_luser_t;
489 492
490 493 extern void smb_pwd_init(boolean_t);
491 494 extern void smb_pwd_fini(void);
492 495 extern smb_passwd_t *smb_pwd_getpwnam(const char *, smb_passwd_t *);
493 496 extern smb_passwd_t *smb_pwd_getpwuid(uid_t, smb_passwd_t *);
494 497 extern int smb_pwd_setpasswd(const char *, const char *);
495 498 extern int smb_pwd_setcntl(const char *, int);
496 499
497 500 extern int smb_pwd_iteropen(smb_pwditer_t *);
498 501 extern smb_luser_t *smb_pwd_iterate(smb_pwditer_t *);
499 502 extern void smb_pwd_iterclose(smb_pwditer_t *);
500 503
501 504 extern int smb_auth_qnd_unicode(smb_wchar_t *, const char *, int);
502 505 extern int smb_auth_hmac_md5(unsigned char *, int, unsigned char *, int,
503 506 unsigned char *);
504 507
505 508 /*
506 509 * A variation on HMAC-MD5 known as HMACT64 is used by Windows systems.
507 510 * The HMACT64() function is the same as the HMAC-MD5() except that
508 511 * it truncates the input key to 64 bytes rather than hashing it down
509 512 * to 16 bytes using the MD5() function.
510 513 */
511 514 #define SMBAUTH_HMACT64(D, Ds, K, Ks, digest) \
512 515 smb_auth_hmac_md5(D, Ds, K, (Ks > 64) ? 64 : Ks, digest)
513 516
514 517 extern int smb_auth_DES(unsigned char *, int, unsigned char *, int,
515 518 unsigned char *, int);
516 519 extern int smb_auth_RC4(unsigned char *, int, unsigned char *, int,
517 520 unsigned char *, int);
518 521
519 522 extern int smb_auth_md4(unsigned char *, unsigned char *, int);
520 523 extern int smb_auth_lm_hash(const char *, unsigned char *);
521 524 extern int smb_auth_ntlm_hash(const char *, unsigned char *);
522 525 extern void smb_auth_ntlm2_mkchallenge(char *, const char *, const char *);
523 526 extern void smb_auth_ntlm2_kxkey(unsigned char *, const char *, const char *,
524 527 unsigned char *);
525 528
526 529 extern int smb_auth_set_info(char *, char *,
527 530 unsigned char *, char *, unsigned char *,
528 531 int, int, smb_auth_info_t *);
529 532
530 533 extern int smb_auth_ntlmv2_hash(unsigned char *,
531 534 char *, char *, unsigned char *);
532 535
533 536 boolean_t smb_auth_validate(smb_passwd_t *, char *, char *,
534 537 uchar_t *, uint_t, uchar_t *, uint_t, uchar_t *, uint_t, uchar_t *);
535 538
536 539 int smb_gen_random_passwd(char *passwd, size_t bufsz);
537 540
538 541 /*
539 542 * SMB authenticated IPC
540 543 */
541 544 extern void smb_ipc_commit(void);
542 545 extern void smb_ipc_get_user(char *, size_t);
543 546 extern void smb_ipc_get_passwd(uint8_t *, size_t);
544 547 extern void smb_ipc_init(void);
545 548 extern void smb_ipc_rollback(void);
546 549 extern void smb_ipc_set(char *, uint8_t *);
547 550
548 551 /*
549 552 * Signing flags:
550 553 *
551 554 * SMB_SCF_ENABLE Signing is enabled.
552 555 *
553 556 * SMB_SCF_REQUIRED Signing is enabled and required.
554 557 * This flag shouldn't be set if
555 558 * SMB_SCF_ENABLE isn't set.
556 559 *
557 560 * SMB_SCF_STARTED Signing will start after receiving
558 561 * the first non-anonymous SessionSetup
559 562 * request.
560 563 *
561 564 * SMB_SCF_KEY_ISSET_THIS_LOGON Indicates whether the MAC key has just
562 565 * been set for this logon. (prior to
563 566 * sending the SMBSessionSetup request)
564 567 *
565 568 */
566 569 #define SMB_SCF_ENABLE 0x01
567 570 #define SMB_SCF_REQUIRED 0x02
568 571 #define SMB_SCF_STARTED 0x04
569 572 #define SMB_SCF_KEY_ISSET_THIS_LOGON 0x08
570 573
571 574 /*
572 575 * Each domain is categorized using the enum values below.
573 576 * The local domain refers to the local machine and is named
574 577 * after the local hostname. The primary domain is the domain
575 578 * that the system joined. All other domains are either
576 579 * trusted or untrusted, as defined by the primary domain PDC.
577 580 */
578 581 typedef enum smb_domain_type {
579 582 SMB_DOMAIN_NULL,
580 583 SMB_DOMAIN_BUILTIN,
581 584 SMB_DOMAIN_LOCAL,
582 585 SMB_DOMAIN_PRIMARY,
583 586 SMB_DOMAIN_ACCOUNT,
584 587 SMB_DOMAIN_TRUSTED,
585 588 SMB_DOMAIN_UNTRUSTED,
586 589 SMB_DOMAIN_NUM_TYPES
587 590 } smb_domain_type_t;
588 591
589 592 /*
590 593 * Information specific to trusted domains
591 594 */
592 595 typedef struct smb_domain_trust {
593 596 uint32_t dti_trust_direction;
594 597 uint32_t dti_trust_type;
595 598 uint32_t dti_trust_attrs;
596 599 } smb_domain_trust_t;
597 600
598 601 /*
599 602 * DNS information for domain types that this info is
600 603 * obtained/available. Currently this is only obtained
601 604 * for the primary domain.
602 605 */
603 606 typedef struct smb_domain_dns {
604 607 char ddi_forest[MAXHOSTNAMELEN];
605 608 char ddi_guid[UUID_PRINTABLE_STRING_LENGTH];
606 609 } smb_domain_dns_t;
607 610
608 611 /*
609 612 * This is the information that is held about each domain.
610 613 */
611 614 typedef struct smb_domain {
612 615 list_node_t di_lnd;
613 616 smb_domain_type_t di_type;
614 617 char di_sid[SMB_SID_STRSZ];
615 618 char di_nbname[NETBIOS_NAME_SZ];
616 619 char di_fqname[MAXHOSTNAMELEN];
617 620 smb_sid_t *di_binsid;
618 621 union {
619 622 smb_domain_dns_t di_dns;
620 623 smb_domain_trust_t di_trust;
621 624 } di_u;
622 625 } smb_domain_t;
623 626
624 627 typedef struct smb_trusted_domains {
625 628 uint32_t td_num;
626 629 smb_domain_t *td_domains;
627 630 } smb_trusted_domains_t;
628 631
629 632 #define SMB_DOMAIN_SUCCESS 0
630 633 #define SMB_DOMAIN_NOMACHINE_SID 1
631 634 #define SMB_DOMAIN_NODOMAIN_SID 2
632 635 #define SMB_DOMAIN_NODOMAIN_NAME 3
633 636 #define SMB_DOMAIN_INTERNAL_ERR 4
634 637 #define SMB_DOMAIN_INVALID_ARG 5
635 638 #define SMB_DOMAIN_NO_MEMORY 6
636 639 #define SMB_DOMAIN_NO_CACHE 7
637 640
638 641 typedef struct smb_dcinfo {
639 642 char dc_name[MAXHOSTNAMELEN];
640 643 smb_inaddr_t dc_addr;
641 644 } smb_dcinfo_t;
642 645
643 646 /*
644 647 * This structure could contain information about
645 648 * the primary domain the name of selected domain controller
646 649 * for the primary domain and a list of trusted domains if
647 650 * any. The "ex" in the structure name stands for extended.
648 651 * This is to differentiate this structure from smb_domain_t
649 652 * which only contains information about a single domain.
650 653 */
651 654 typedef struct smb_domainex {
652 655 smb_dcinfo_t d_dci;
653 656 smb_domain_t d_primary;
654 657 smb_trusted_domains_t d_trusted;
655 658 } smb_domainex_t;
656 659
657 660 int smb_domain_init(uint32_t);
658 661 void smb_domain_fini(void);
659 662 void smb_domain_show(void);
660 663 void smb_domain_save(void);
661 664 boolean_t smb_domain_lookup_name(char *, smb_domain_t *);
662 665 boolean_t smb_domain_lookup_sid(smb_sid_t *, smb_domain_t *);
663 666 boolean_t smb_domain_lookup_type(smb_domain_type_t, smb_domain_t *);
664 667 boolean_t smb_domain_getinfo(smb_domainex_t *);
665 668 void smb_domain_update(smb_domainex_t *);
666 669 uint32_t smb_domain_start_update(void);
667 670 void smb_domain_end_update(void);
668 671 void smb_domain_set_basic_info(char *, char *, char *, smb_domain_t *);
669 672 void smb_domain_set_dns_info(char *, char *, char *, char *, char *,
670 673 smb_domain_t *);
671 674 void smb_domain_set_trust_info(char *, char *, char *,
672 675 uint32_t, uint32_t, uint32_t, smb_domain_t *);
673 676 void smb_domain_current_dc(smb_dcinfo_t *);
674 677 void smb_domain_bad_dc(void);
675 678
676 679 typedef struct smb_gsid {
677 680 smb_sid_t *gs_sid;
678 681 uint16_t gs_type;
679 682 } smb_gsid_t;
680 683
681 684 struct sqlite_vm;
682 685 struct sqlite;
683 686
684 687 typedef struct smb_giter {
685 688 struct sqlite_vm *sgi_vm;
686 689 struct sqlite *sgi_db;
687 690 uint32_t sgi_nerr;
688 691 } smb_giter_t;
689 692
690 693 typedef struct smb_group {
691 694 char *sg_name;
692 695 char *sg_cmnt;
693 696 uint32_t sg_attr;
694 697 uint32_t sg_rid;
695 698 smb_gsid_t sg_id;
696 699 smb_domain_type_t sg_domain;
697 700 smb_privset_t *sg_privs;
698 701 uint32_t sg_nmembers;
699 702 smb_gsid_t *sg_members;
700 703 } smb_group_t;
701 704
702 705 int smb_lgrp_start(void);
703 706 void smb_lgrp_stop(void);
704 707 int smb_lgrp_add(char *, char *);
705 708 int smb_lgrp_rename(char *, char *);
706 709 int smb_lgrp_delete(char *);
707 710 int smb_lgrp_setcmnt(char *, char *);
708 711 int smb_lgrp_getcmnt(char *, char **);
709 712 int smb_lgrp_getpriv(char *, uint8_t, boolean_t *);
710 713 int smb_lgrp_setpriv(char *, uint8_t, boolean_t);
711 714 int smb_lgrp_add_member(char *, smb_sid_t *, uint16_t);
712 715 int smb_lgrp_del_member(char *, smb_sid_t *, uint16_t);
713 716 int smb_lgrp_getbyname(char *, smb_group_t *);
714 717 int smb_lgrp_getbyrid(uint32_t, smb_domain_type_t, smb_group_t *);
715 718 void smb_lgrp_free(smb_group_t *);
716 719 uint32_t smb_lgrp_err_to_ntstatus(uint32_t);
717 720 boolean_t smb_lgrp_is_member(smb_group_t *, smb_sid_t *);
718 721 char *smb_lgrp_strerror(int);
719 722 int smb_lgrp_iteropen(smb_giter_t *);
720 723 void smb_lgrp_iterclose(smb_giter_t *);
721 724 boolean_t smb_lgrp_itererror(smb_giter_t *);
722 725 int smb_lgrp_iterate(smb_giter_t *, smb_group_t *);
723 726
724 727 int smb_lookup_sid(const char *, lsa_account_t *);
725 728 int smb_lookup_lsid(const char *, lsa_account_t *);
726 729 int smb_lookup_name(const char *, sid_type_t, lsa_account_t *);
727 730 int smb_lookup_lname(const char *, sid_type_t, lsa_account_t *);
728 731
729 732 #define SMB_LGRP_SUCCESS 0
730 733 #define SMB_LGRP_INVALID_ARG 1
731 734 #define SMB_LGRP_INVALID_MEMBER 2
732 735 #define SMB_LGRP_INVALID_NAME 3
733 736 #define SMB_LGRP_NOT_FOUND 4
734 737 #define SMB_LGRP_EXISTS 5
735 738 #define SMB_LGRP_NO_SID 6
736 739 #define SMB_LGRP_NO_LOCAL_SID 7
737 740 #define SMB_LGRP_SID_NOTLOCAL 8
738 741 #define SMB_LGRP_WKSID 9
739 742 #define SMB_LGRP_NO_MEMORY 10
740 743 #define SMB_LGRP_DB_ERROR 11
741 744 #define SMB_LGRP_DBINIT_ERROR 12
742 745 #define SMB_LGRP_INTERNAL_ERROR 13
743 746 #define SMB_LGRP_MEMBER_IN_GROUP 14
744 747 #define SMB_LGRP_MEMBER_NOT_IN_GROUP 15
745 748 #define SMB_LGRP_NO_SUCH_PRIV 16
746 749 #define SMB_LGRP_NO_SUCH_DOMAIN 17
747 750 #define SMB_LGRP_PRIV_HELD 18
748 751 #define SMB_LGRP_PRIV_NOT_HELD 19
749 752 #define SMB_LGRP_BAD_DATA 20
750 753 #define SMB_LGRP_NO_MORE 21
751 754 #define SMB_LGRP_DBOPEN_FAILED 22
752 755 #define SMB_LGRP_DBEXEC_FAILED 23
753 756 #define SMB_LGRP_DBINIT_FAILED 24
754 757 #define SMB_LGRP_DOMLKP_FAILED 25
755 758 #define SMB_LGRP_DOMINS_FAILED 26
756 759 #define SMB_LGRP_INSERT_FAILED 27
757 760 #define SMB_LGRP_DELETE_FAILED 28
758 761 #define SMB_LGRP_UPDATE_FAILED 29
759 762 #define SMB_LGRP_LOOKUP_FAILED 30
760 763 #define SMB_LGRP_NOT_SUPPORTED 31
761 764 #define SMB_LGRP_OFFLINE 32
762 765 #define SMB_LGRP_POSIXCREATE_FAILED 33
763 766
764 767 #define SMB_LGRP_COMMENT_MAX 256
765 768
766 769 /*
767 770 * values for smb_nic_t.smbflags
768 771 */
769 772 #define SMB_NICF_NBEXCL 0x01 /* Excluded from Netbios activities */
770 773 #define SMB_NICF_ALIAS 0x02 /* This is an alias */
771 774
772 775 /*
773 776 * smb_nic_t
774 777 * nic_host actual host name
775 778 * nic_nbname 16-byte NetBIOS host name
776 779 */
777 780 typedef struct {
778 781 char nic_host[MAXHOSTNAMELEN];
779 782 char nic_nbname[NETBIOS_NAME_SZ];
780 783 char nic_cmnt[SMB_PI_MAX_COMMENT];
781 784 char nic_ifname[LIFNAMSIZ];
782 785 smb_inaddr_t nic_ip;
783 786 uint32_t nic_mask;
784 787 uint32_t nic_bcast;
785 788 uint32_t nic_smbflags;
786 789 uint64_t nic_sysflags;
787 790 } smb_nic_t;
788 791
789 792 typedef struct smb_niciter {
790 793 smb_nic_t ni_nic;
791 794 int ni_cookie;
792 795 int ni_seqnum;
793 796 } smb_niciter_t;
794 797
795 798 /* NIC config functions */
796 799 int smb_nic_init(void);
797 800 void smb_nic_fini(void);
798 801 int smb_nic_getnum(char *);
799 802 int smb_nic_addhost(const char *, const char *, int, const char **);
800 803 int smb_nic_delhost(const char *);
801 804 int smb_nic_getfirst(smb_niciter_t *);
802 805 int smb_nic_getnext(smb_niciter_t *);
803 806 boolean_t smb_nic_is_local(smb_inaddr_t *);
804 807 boolean_t smb_nic_is_same_subnet(smb_inaddr_t *);
805 808
806 809 #define SMB_NIC_SUCCESS 0
807 810 #define SMB_NIC_INVALID_ARG 1
808 811 #define SMB_NIC_NOT_FOUND 2
809 812 #define SMB_NIC_NO_HOST 3
810 813 #define SMB_NIC_NO_MEMORY 4
811 814 #define SMB_NIC_DB_ERROR 5
812 815 #define SMB_NIC_DBINIT_ERROR 6
813 816 #define SMB_NIC_BAD_DATA 7
814 817 #define SMB_NIC_NO_MORE 8
815 818 #define SMB_NIC_DBOPEN_FAILED 9
816 819 #define SMB_NIC_DBEXEC_FAILED 10
817 820 #define SMB_NIC_DBINIT_FAILED 11
818 821 #define SMB_NIC_INSERT_FAILED 12
819 822 #define SMB_NIC_DELETE_FAILED 13
820 823 #define SMB_NIC_SOCK 14
821 824 #define SMB_NIC_IOCTL 15
822 825 #define SMB_NIC_CHANGED 16
823 826
824 827 /*
825 828 * Well-known account structure
826 829 *
827 830 * A security identifier (SID) is a unique value of variable length that
828 831 * is used to identify a security principal or security group in
829 832 * Windows. Well-known SIDs are a group of SIDs that identify generic
830 833 * users or generic groups. Their values remain constant across all
831 834 * operating systems.
832 835 *
833 836 * This structure is defined to store these SIDs and other related
834 837 * information about them (e.g. account and domain names) in a
835 838 * predefined table.
836 839 */
837 840 typedef struct smb_wka {
838 841 uint8_t wka_domidx;
839 842 char *wka_sid;
840 843 char *wka_name;
841 844 uint16_t wka_type;
842 845 uint16_t wka_flags;
843 846 char *wka_desc;
844 847 smb_sid_t *wka_binsid;
845 848 } smb_wka_t;
846 849
847 850 /*
848 851 * Defined values for smb_wka.wka_flags
849 852 *
850 853 * SMB_WKAFLG_LGRP_ENABLE Can be added as local group
851 854 */
852 855 #define SMB_WKAFLG_LGRP_ENABLE 0x1
853 856
854 857 /*
855 858 * Well-known account interfaces
856 859 */
857 860 smb_wka_t *smb_wka_lookup_builtin(const char *);
858 861 smb_wka_t *smb_wka_lookup_name(const char *);
859 862 smb_wka_t *smb_wka_lookup_sid(smb_sid_t *);
860 863 smb_sid_t *smb_wka_get_sid(const char *);
861 864 char *smb_wka_get_domain(int);
862 865 uint32_t smb_wka_token_groups(uint32_t, smb_ids_t *);
863 866
864 867 /*
865 868 * In memory account representation
866 869 */
867 870 typedef struct smb_account {
868 871 char *a_name;
869 872 char *a_domain;
870 873 uint16_t a_type;
871 874 smb_sid_t *a_sid;
872 875 smb_sid_t *a_domsid;
873 876 uint32_t a_rid;
874 877 uint32_t a_flags;
875 878 } smb_account_t;
876 879
877 880 uint32_t smb_sam_lookup_name(char *, char *, uint16_t, smb_account_t *);
878 881 uint32_t smb_sam_lookup_sid(smb_sid_t *, smb_account_t *);
879 882 int smb_sam_usr_cnt(void);
880 883 uint32_t smb_sam_usr_groups(smb_sid_t *, smb_ids_t *);
881 884 int smb_sam_grp_cnt(smb_domain_type_t);
882 885 void smb_account_free(smb_account_t *);
883 886 boolean_t smb_account_validate(smb_account_t *);
884 887
885 888 /*
886 889 * Security Descriptor functions.
887 890 */
888 891 uint32_t smb_sd_read(char *path, smb_sd_t *, uint32_t);
889 892 uint32_t smb_sd_write(char *path, smb_sd_t *, uint32_t);
890 893 uint32_t smb_sd_fromfs(smb_fssd_t *, smb_sd_t *);
891 894
892 895 /* Kernel Module Interface */
893 896 int smb_kmod_bind(void);
894 897 boolean_t smb_kmod_isbound(void);
895 898 int smb_kmod_setcfg(smb_kmod_cfg_t *);
896 899 int smb_kmod_setgmtoff(int32_t);
897 900 int smb_kmod_start(int, int, int);
898 901 void smb_kmod_stop(void);
899 902 int smb_kmod_event_notify(uint32_t);
900 903 void smb_kmod_unbind(void);
901 904 int smb_kmod_share(nvlist_t *);
902 905 int smb_kmod_unshare(nvlist_t *);
903 906 int smb_kmod_shareinfo(char *, boolean_t *);
904 907 int smb_kmod_get_open_num(smb_opennum_t *);
905 908 int smb_kmod_enum(smb_netsvc_t *);
906 909 smb_netsvc_t *smb_kmod_enum_init(smb_svcenum_t *);
907 910 void smb_kmod_enum_fini(smb_netsvc_t *);
908 911 int smb_kmod_session_close(const char *, const char *);
909 912 int smb_kmod_file_close(uint32_t);
910 913 int smb_kmod_get_spool_doc(uint32_t *, char *, char *, smb_inaddr_t *);
911 914
912 915 void smb_name_parse(char *, char **, char **);
913 916 uint32_t smb_name_validate_share(const char *);
914 917 uint32_t smb_name_validate_account(const char *);
915 918 uint32_t smb_name_validate_domain(const char *);
916 919 uint32_t smb_name_validate_nbdomain(const char *);
917 920 uint32_t smb_name_validate_workgroup(const char *);
918 921 uint32_t smb_name_validate_rpath(const char *);
919 922
920 923 /*
921 924 * Interposer library validation
922 925 */
923 926 #define SMBEX_VERSION 1
924 927 #define SMBEX_KEY "82273fdc-e32a-18c3-3f78-827929dc23ea"
925 928 typedef struct smbex_version {
926 929 uint32_t v_version;
927 930 uuid_t v_uuid;
928 931 } smbex_version_t;
929 932 void *smb_dlopen(void);
930 933 void smb_dlclose(void *);
931 934
932 935 /*
933 936 * General purpose multi-thread safe cache based on
934 937 * AVL tree
935 938 */
936 939 typedef struct smb_cache {
937 940 avl_tree_t ch_cache;
938 941 rwlock_t ch_cache_lck;
939 942 uint32_t ch_state;
940 943 uint32_t ch_nops;
941 944 uint32_t ch_wait;
942 945 uint32_t ch_sequence;
943 946 size_t ch_datasz;
944 947 mutex_t ch_mtx;
945 948 cond_t ch_cv;
946 949 void (*ch_free)(void *);
947 950 void (*ch_copy)(const void *, void *, size_t);
948 951 } smb_cache_t;
949 952
950 953 typedef struct smb_cache_node {
951 954 avl_node_t cn_link;
952 955 void *cn_data;
953 956 } smb_cache_node_t;
954 957
955 958 typedef struct smb_cache_cursor {
956 959 void *cc_next;
957 960 uint32_t cc_sequence;
958 961 } smb_cache_cursor_t;
959 962
960 963 /*
961 964 * flags used with smb_cache_add()
962 965 *
963 966 * SMB_CACHE_ADD If object doesn't exist add, otherwise fail
964 967 * SMB_CACHE_REPLACE If object doesn't exist add, otherwise replace
965 968 */
966 969 #define SMB_CACHE_ADD 1
967 970 #define SMB_CACHE_REPLACE 2
968 971
969 972 void smb_cache_create(smb_cache_t *, uint32_t,
970 973 int (*cmpfn) (const void *, const void *), void (*freefn)(void *),
971 974 void (*copyfn)(const void *, void *, size_t), size_t);
972 975 void smb_cache_destroy(smb_cache_t *);
973 976 void smb_cache_flush(smb_cache_t *);
974 977 uint32_t smb_cache_num(smb_cache_t *);
975 978 int smb_cache_refreshing(smb_cache_t *);
976 979 void smb_cache_ready(smb_cache_t *);
977 980 int smb_cache_add(smb_cache_t *, const void *, int);
978 981 void smb_cache_remove(smb_cache_t *, const void *);
979 982 void smb_cache_iterinit(smb_cache_t *, smb_cache_cursor_t *);
980 983 boolean_t smb_cache_iterate(smb_cache_t *, smb_cache_cursor_t *, void *);
981 984
982 985 /*
983 986 * Values returned by smb_reparse_stat()
984 987 */
985 988 #define SMB_REPARSE_NOTFOUND 1 /* object does not exist */
986 989 #define SMB_REPARSE_NOTREPARSE 2 /* object is NOT a reparse point */
987 990 #define SMB_REPARSE_ISREPARSE 3 /* object is a reparse point */
988 991
989 992 /*
990 993 * Reparse Point API
991 994 */
992 995 int smb_reparse_stat(const char *, uint32_t *);
993 996 int smb_reparse_svcadd(const char *, const char *, const char *);
994 997 int smb_reparse_svcdel(const char *, const char *);
995 998 int smb_reparse_svcget(const char *, const char *, char **);
996 999
997 1000 uint32_t smb_get_txid(void);
998 1001
999 1002 void smb_syslog(int, const char *, ...);
1000 1003 void smb_vsyslog(int, const char *, va_list ap);
1001 1004 char *smb_syslog_fmt_m(char *, int, const char *, int);
1002 1005
1003 1006 #ifdef __cplusplus
1004 1007 }
1005 1008 #endif
1006 1009
1007 1010 #endif /* _LIBSMB_H */
↓ open down ↓ |
774 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX