xref: /titanic_44/usr/src/lib/smbsrv/libmlsvc/common/libmlsvc.h (revision e4b86885570d77af552e9cf94f142f4d744fb8c8)
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 #pragma ident	"@(#)libmlsvc.h	1.7	08/08/05 SMI"
30 
31 #include <sys/types.h>
32 #include <smbsrv/smb_sid.h>
33 #include <smbsrv/hash_table.h>
34 #include <smbsrv/smb_token.h>
35 #include <smbsrv/smb_privilege.h>
36 #include <smbsrv/smb_share.h>
37 #include <smbsrv/libsmb.h>
38 
39 #ifdef	__cplusplus
40 extern "C" {
41 #endif
42 
43 extern int mlsvc_init(void);
44 extern uint32_t mlsvc_lookup_name(char *, smb_sid_t **, uint16_t *);
45 extern uint32_t mlsvc_lookup_sid(smb_sid_t *, char **);
46 extern DWORD mlsvc_netlogon(char *, char *);
47 extern DWORD lsa_query_primary_domain_info(void);
48 extern DWORD lsa_query_account_domain_info(void);
49 extern DWORD lsa_enum_trusted_domains(void);
50 
51 extern boolean_t smbd_locate_dc(char *, char *);
52 
53 #define	SMB_AUTOHOME_FILE	"smbautohome"
54 #define	SMB_AUTOHOME_PATH	"/etc"
55 
56 typedef struct smb_autohome {
57 	struct smb_autohome *ah_next;
58 	uint32_t ah_hits;
59 	time_t ah_timestamp;
60 	char *ah_name;		/* User account name */
61 	char *ah_path;		/* Home directory path */
62 	char *ah_container;	/* ADS container distinguished name */
63 } smb_autohome_t;
64 
65 extern void smb_autohome_add(const char *);
66 extern void smb_autohome_remove(const char *);
67 
68 #ifdef	__cplusplus
69 }
70 #endif
71 
72 #endif	/* _LIBMLSVC_H */
73