xref: /titanic_52/usr/src/lib/smbsrv/libmlsvc/common/mlsvc.h (revision b3700b074e637f8c6991b70754c88a2cfffb246b)
18d7e4166Sjose borrego /*
28d7e4166Sjose borrego  * CDDL HEADER START
38d7e4166Sjose borrego  *
48d7e4166Sjose borrego  * The contents of this file are subject to the terms of the
58d7e4166Sjose borrego  * Common Development and Distribution License (the "License").
68d7e4166Sjose borrego  * You may not use this file except in compliance with the License.
78d7e4166Sjose borrego  *
88d7e4166Sjose borrego  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
98d7e4166Sjose borrego  * or http://www.opensolaris.org/os/licensing.
108d7e4166Sjose borrego  * See the License for the specific language governing permissions
118d7e4166Sjose borrego  * and limitations under the License.
128d7e4166Sjose borrego  *
138d7e4166Sjose borrego  * When distributing Covered Code, include this CDDL HEADER in each
148d7e4166Sjose borrego  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
158d7e4166Sjose borrego  * If applicable, add the following below this CDDL HEADER, with the
168d7e4166Sjose borrego  * fields enclosed by brackets "[]" replaced with your own identifying
178d7e4166Sjose borrego  * information: Portions Copyright [yyyy] [name of copyright owner]
188d7e4166Sjose borrego  *
198d7e4166Sjose borrego  * CDDL HEADER END
208d7e4166Sjose borrego  */
218d7e4166Sjose borrego /*
22cb174861Sjoyce mcintosh  * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
23*b3700b07SGordon Ross  * Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
248d7e4166Sjose borrego  */
258d7e4166Sjose borrego 
268d7e4166Sjose borrego #ifndef _SMBSRV_MLSVC_H
278d7e4166Sjose borrego #define	_SMBSRV_MLSVC_H
288d7e4166Sjose borrego 
2929bd2886SAlan Wright #include <smbsrv/smb_share.h>
308d7e4166Sjose borrego #include <smbsrv/ndl/netlogon.ndl>
318d7e4166Sjose borrego 
328d7e4166Sjose borrego #ifdef __cplusplus
338d7e4166Sjose borrego extern "C" {
348d7e4166Sjose borrego #endif
358d7e4166Sjose borrego 
36*b3700b07SGordon Ross struct netr_info;
37*b3700b07SGordon Ross 
388d7e4166Sjose borrego int smb_dclocator_init(void);
391ed6b69aSGordon Ross void smbrdr_initialize(void);
408d7e4166Sjose borrego void dssetup_initialize(void);
418d7e4166Sjose borrego void srvsvc_initialize(void);
428d7e4166Sjose borrego void wkssvc_initialize(void);
438d7e4166Sjose borrego void lsarpc_initialize(void);
448d7e4166Sjose borrego void logr_initialize(void);
458d7e4166Sjose borrego void netr_initialize(void);
468d7e4166Sjose borrego void samr_initialize(void);
478d7e4166Sjose borrego void svcctl_initialize(void);
488d7e4166Sjose borrego void winreg_initialize(void);
498d7e4166Sjose borrego int srvsvc_gettime(unsigned long *);
508d7e4166Sjose borrego void msgsvcsend_initialize(void);
518d7e4166Sjose borrego void spoolss_initialize(void);
529fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States void netdfs_initialize(void);
538d7e4166Sjose borrego 
541fcced4cSJordan Brown void logr_finalize(void);
551fcced4cSJordan Brown void svcctl_finalize(void);
56cb174861Sjoyce mcintosh void spoolss_finalize(void);
579fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States void netdfs_finalize(void);
581fcced4cSJordan Brown 
59*b3700b07SGordon Ross /* netr_auth.c */
60*b3700b07SGordon Ross DWORD netr_open(char *, char *, mlsvc_handle_t *);
618d7e4166Sjose borrego int netr_close(mlsvc_handle_t *);
628d7e4166Sjose borrego DWORD netlogon_auth(char *, mlsvc_handle_t *, DWORD);
63*b3700b07SGordon Ross int netr_setup_authenticator(struct netr_info *, struct netr_authenticator *,
648d7e4166Sjose borrego     struct netr_authenticator *);
65*b3700b07SGordon Ross DWORD netr_validate_chain(struct netr_info *, struct netr_authenticator *);
668d7e4166Sjose borrego 
679fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States void ndr_srvsvc_timecheck(char *, char *);
689fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States 
6929bd2886SAlan Wright /* Generic functions to get/set windows Security Descriptors */
7029bd2886SAlan Wright uint32_t srvsvc_sd_get(smb_share_t *, uint8_t *, uint32_t *);
7129bd2886SAlan Wright uint32_t srvsvc_sd_set(smb_share_t *, uint8_t *);
7229bd2886SAlan Wright 
7329bd2886SAlan Wright uint32_t smb_logon_init(void);
7429bd2886SAlan Wright void smb_logon_fini(void);
7529bd2886SAlan Wright 
76e3f2c991SKeyur Desai /* Locking for process-wide settings (i.e. privileges) */
77e3f2c991SKeyur Desai void smb_proc_initsem(void);	/* init (or re-init in child) */
78e3f2c991SKeyur Desai int  smb_proc_takesem(void);	/* parent before */
79e3f2c991SKeyur Desai void smb_proc_givesem(void);	/* parent after */
80e3f2c991SKeyur Desai 
819fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States /* Quota */
829fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States void smb_quota_init(void);
839fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States void smb_quota_fini(void);
849fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States void smb_quota_add_fs(const char *);
859fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States void smb_quota_remove_fs(const char *);
869fb67ea3Safshin salek ardakani - Sun Microsystems - Irvine United States 
87*b3700b07SGordon Ross uint32_t smb_ddiscover_main(char *, smb_domainex_t *);
88*b3700b07SGordon Ross 
898d7e4166Sjose borrego #ifdef __cplusplus
908d7e4166Sjose borrego }
918d7e4166Sjose borrego #endif
928d7e4166Sjose borrego #endif /* _SMBSRV_MLSVC_H */
93