xref: /onnv-gate/usr/src/lib/smbsrv/libmlsvc/common/libmlsvc.h (revision 6771:2e6e486314b6)
15331Samw /*
25331Samw  * CDDL HEADER START
35331Samw  *
45331Samw  * The contents of this file are subject to the terms of the
55331Samw  * Common Development and Distribution License (the "License").
65331Samw  * You may not use this file except in compliance with the License.
75331Samw  *
85331Samw  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
95331Samw  * or http://www.opensolaris.org/os/licensing.
105331Samw  * See the License for the specific language governing permissions
115331Samw  * and limitations under the License.
125331Samw  *
135331Samw  * When distributing Covered Code, include this CDDL HEADER in each
145331Samw  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
155331Samw  * If applicable, add the following below this CDDL HEADER, with the
165331Samw  * fields enclosed by brackets "[]" replaced with your own identifying
175331Samw  * information: Portions Copyright [yyyy] [name of copyright owner]
185331Samw  *
195331Samw  * CDDL HEADER END
205331Samw  */
215331Samw /*
225772Sas200622  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
235331Samw  * Use is subject to license terms.
245331Samw  */
255331Samw 
265331Samw #ifndef	_LIBMLSVC_H
275331Samw #define	_LIBMLSVC_H
285331Samw 
295331Samw #pragma ident	"%Z%%M%	%I%	%E% SMI"
305331Samw 
315331Samw #include <sys/types.h>
326432Sas200622 #include <smbsrv/smb_sid.h>
335331Samw #include <smbsrv/hash_table.h>
345331Samw #include <smbsrv/smb_token.h>
355331Samw #include <smbsrv/smb_privilege.h>
365331Samw #include <smbsrv/lmshare.h>
375331Samw #include <smbsrv/libsmb.h>
385331Samw 
395331Samw #ifdef	__cplusplus
405331Samw extern "C" {
415331Samw #endif
425331Samw 
435331Samw extern int mlsvc_init(void);
446432Sas200622 extern uint32_t mlsvc_lookup_name(char *, smb_sid_t **, uint16_t *);
456432Sas200622 extern uint32_t mlsvc_lookup_sid(smb_sid_t *, char **);
466139Sjb150015 extern DWORD mlsvc_netlogon(char *, char *);
475331Samw extern DWORD lsa_query_primary_domain_info(void);
485331Samw extern DWORD lsa_query_account_domain_info(void);
495331Samw extern DWORD lsa_enum_trusted_domains(void);
505331Samw 
516139Sjb150015 extern boolean_t smbd_locate_dc(char *, char *);
525331Samw 
535331Samw #define	SMB_AUTOHOME_FILE	"smbautohome"
545331Samw #define	SMB_AUTOHOME_PATH	"/etc"
555331Samw 
565331Samw typedef struct smb_autohome {
575331Samw 	struct smb_autohome *ah_next;
585331Samw 	uint32_t ah_hits;
595331Samw 	time_t ah_timestamp;
605331Samw 	char *ah_name;		/* User account name */
615331Samw 	char *ah_path;		/* Home directory path */
625331Samw 	char *ah_container;	/* ADS container distinguished name */
635331Samw } smb_autohome_t;
645331Samw 
65*6771Sjb150015 extern void smb_autohome_add(const char *);
66*6771Sjb150015 extern void smb_autohome_remove(const char *);
67*6771Sjb150015 extern boolean_t smb_is_autohome(const lmshare_info_t *);
685331Samw 
695331Samw #ifdef	__cplusplus
705331Samw }
715331Samw #endif
725331Samw 
735331Samw #endif	/* _LIBMLSVC_H */
74