xref: /titanic_44/usr/src/lib/smbsrv/libmlsvc/common/libmlsvc.h (revision a38ddfee9c8c6b6c5a2947ff52fd2338362a4444)
1 /*
2  * CDDL HEADER START
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 2008 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 
26 #ifndef	_LIBMLSVC_H
27 #define	_LIBMLSVC_H
28 
29 #include <sys/types.h>
30 #include <smbsrv/smb_sid.h>
31 #include <smbsrv/hash_table.h>
32 #include <smbsrv/smb_token.h>
33 #include <smbsrv/smb_privilege.h>
34 #include <smbsrv/smb_share.h>
35 #include <smbsrv/libsmb.h>
36 #include <smbsrv/smb_xdr.h>
37 
38 #ifdef	__cplusplus
39 extern "C" {
40 #endif
41 
42 extern int mlsvc_get_door_fd(void);
43 extern uint64_t mlsvc_get_num_users(void);
44 extern int mlsvc_get_user_list(int, smb_dr_ulist_t *);
45 extern void dssetup_clear_domain_info(void);
46 extern int mlsvc_init(void);
47 extern void mlsvc_set_door_fd(int);
48 extern int mlsvc_set_share(int, char *, char *);
49 extern uint32_t mlsvc_lookup_name(char *, smb_sid_t **, uint16_t *);
50 extern uint32_t mlsvc_lookup_sid(smb_sid_t *, char **);
51 extern DWORD mlsvc_netlogon(char *, char *);
52 extern DWORD lsa_query_primary_domain_info(void);
53 extern DWORD lsa_query_account_domain_info(void);
54 extern DWORD lsa_enum_trusted_domains(void);
55 
56 extern boolean_t smbd_locate_dc(char *, char *);
57 
58 #define	SMB_AUTOHOME_FILE	"smbautohome"
59 #define	SMB_AUTOHOME_PATH	"/etc"
60 
61 typedef struct smb_autohome {
62 	struct smb_autohome *ah_next;
63 	uint32_t ah_hits;
64 	time_t ah_timestamp;
65 	char *ah_name;		/* User account name */
66 	char *ah_path;		/* Home directory path */
67 	char *ah_container;	/* ADS container distinguished name */
68 } smb_autohome_t;
69 
70 extern void smb_autohome_add(const char *);
71 extern void smb_autohome_remove(const char *);
72 
73 #ifdef	__cplusplus
74 }
75 #endif
76 
77 #endif	/* _LIBMLSVC_H */
78