xref: /onnv-gate/usr/src/lib/smbsrv/libmlsvc/common/libmlsvc.h (revision 5772:237ac22142fe)
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 /*
22*5772Sas200622  * 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>
325331Samw #include <smbsrv/ntsid.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);
44*5772Sas200622 extern uint32_t mlsvc_lookup_name(char *, nt_sid_t **, uint16_t *);
45*5772Sas200622 extern uint32_t mlsvc_lookup_sid(nt_sid_t *, char **);
465331Samw extern DWORD lsa_query_primary_domain_info(void);
475331Samw extern DWORD lsa_query_account_domain_info(void);
485331Samw extern DWORD lsa_enum_trusted_domains(void);
495331Samw 
505331Samw extern boolean_t locate_resource_pdc(char *);
515331Samw 
525331Samw #define	SMB_AUTOHOME_FILE	"smbautohome"
535331Samw #define	SMB_AUTOHOME_PATH	"/etc"
545331Samw 
555331Samw typedef struct smb_autohome {
565331Samw 	struct smb_autohome *ah_next;
575331Samw 	uint32_t ah_hits;
585331Samw 	time_t ah_timestamp;
595331Samw 	char *ah_name;		/* User account name */
605331Samw 	char *ah_path;		/* Home directory path */
615331Samw 	char *ah_container;	/* ADS container distinguished name */
625331Samw } smb_autohome_t;
635331Samw 
645331Samw extern int smb_autohome_add(const char *);
655331Samw extern int smb_autohome_remove(const char *);
665331Samw extern int smb_is_autohome(const lmshare_info_t *);
675331Samw extern void smb_autohome_setent(void);
685331Samw extern void smb_autohome_endent(void);
695331Samw extern smb_autohome_t *smb_autohome_getent(const char *name);
705331Samw extern smb_autohome_t *smb_autohome_lookup(const char *name);
715331Samw 
725331Samw #ifdef	__cplusplus
735331Samw }
745331Samw #endif
755331Samw 
765331Samw #endif	/* _LIBMLSVC_H */
77