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 /* 227f667e74Sjose borrego * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 238d7e4166Sjose borrego * Use is subject to license terms. 24*b3700b07SGordon Ross * 25*b3700b07SGordon Ross * Copyright 2015 Nexenta Systems, Inc. All rights reserved. 268d7e4166Sjose borrego */ 278d7e4166Sjose borrego 287f667e74Sjose borrego #ifndef _LSALIB_H 297f667e74Sjose borrego #define _LSALIB_H 308d7e4166Sjose borrego 318d7e4166Sjose borrego /* 328d7e4166Sjose borrego * Prototypes for the LSA library and RPC client side library interface. 338d7e4166Sjose borrego * There are two levels of interface defined here: lsa_xxx and lsar_xxx. 348d7e4166Sjose borrego * The lsa_xxx functions provide a high level interface which make 358d7e4166Sjose borrego * multiple RPC calls and do all the work necessary to obtain and return 368d7e4166Sjose borrego * the requested information. The lsar_xxx functions provide a low level 378d7e4166Sjose borrego * interface in which each function maps to a single underlying RPC. 388d7e4166Sjose borrego */ 398d7e4166Sjose borrego 408d7e4166Sjose borrego #include <smbsrv/ndl/lsarpc.ndl> 417f667e74Sjose borrego #include <smbsrv/libsmb.h> 428d7e4166Sjose borrego #include <smbsrv/libmlsvc.h> 438d7e4166Sjose borrego #include <smbsrv/smb_sid.h> 448d7e4166Sjose borrego 458d7e4166Sjose borrego 468d7e4166Sjose borrego #ifdef __cplusplus 478d7e4166Sjose borrego extern "C" { 488d7e4166Sjose borrego #endif 498d7e4166Sjose borrego 50fe1c642dSBill Krier typedef struct mslsa_sid lsa_sid_t; 51fe1c642dSBill Krier 528d7e4166Sjose borrego /* 538d7e4166Sjose borrego * lsalib.c 548d7e4166Sjose borrego */ 557f667e74Sjose borrego uint32_t lsa_lookup_name(char *, uint16_t, smb_account_t *); 567f667e74Sjose borrego uint32_t lsa_lookup_sid(smb_sid_t *, smb_account_t *); 57a0aa776eSAlan Wright DWORD lsa_query_primary_domain_info(char *, char *, smb_domain_t *); 58a0aa776eSAlan Wright DWORD lsa_query_account_domain_info(char *, char *, smb_domain_t *); 59a0aa776eSAlan Wright DWORD lsa_query_dns_domain_info(char *, char *, smb_domain_t *); 6029bd2886SAlan Wright DWORD lsa_enum_trusted_domains(char *, char *, smb_trusted_domains_t *); 6129bd2886SAlan Wright DWORD lsa_enum_trusted_domains_ex(char *, char *, smb_trusted_domains_t *); 628d7e4166Sjose borrego 638d7e4166Sjose borrego /* 648d7e4166Sjose borrego * lsar_open.c 658d7e4166Sjose borrego */ 66*b3700b07SGordon Ross DWORD lsar_open(char *, char *, char *, mlsvc_handle_t *); 67*b3700b07SGordon Ross DWORD lsar_open_policy2(char *, char *, char *, mlsvc_handle_t *); 687f667e74Sjose borrego int lsar_open_account(mlsvc_handle_t *, struct mslsa_sid *, mlsvc_handle_t *); 697f667e74Sjose borrego int lsar_close(mlsvc_handle_t *); 708d7e4166Sjose borrego 718d7e4166Sjose borrego /* 728d7e4166Sjose borrego * lsar_lookup.c 738d7e4166Sjose borrego */ 747f667e74Sjose borrego int lsar_query_security_desc(mlsvc_handle_t *); 75a0aa776eSAlan Wright DWORD lsar_query_info_policy(mlsvc_handle_t *, WORD, smb_domain_t *); 767f667e74Sjose borrego uint32_t lsar_lookup_names(mlsvc_handle_t *, char *, smb_account_t *); 77fe1c642dSBill Krier uint32_t lsar_lookup_sids(mlsvc_handle_t *, smb_sid_t *, smb_account_t *); 788d7e4166Sjose borrego 79*b3700b07SGordon Ross DWORD lsar_enum_accounts(mlsvc_handle_t *, DWORD *, 807f667e74Sjose borrego struct mslsa_EnumAccountBuf *); 8129bd2886SAlan Wright DWORD lsar_enum_trusted_domains(mlsvc_handle_t *, DWORD *, 8229bd2886SAlan Wright smb_trusted_domains_t *); 8329bd2886SAlan Wright DWORD lsar_enum_trusted_domains_ex(mlsvc_handle_t *, DWORD *, 8429bd2886SAlan Wright smb_trusted_domains_t *); 857f667e74Sjose borrego int lsar_enum_privs_account(mlsvc_handle_t *, smb_account_t *); 867f667e74Sjose borrego int lsar_lookup_priv_value(mlsvc_handle_t *, char *, struct ms_luid *); 877f667e74Sjose borrego int lsar_lookup_priv_name(mlsvc_handle_t *, struct ms_luid *, char *, int); 887f667e74Sjose borrego DWORD lsar_lookup_priv_display_name(mlsvc_handle_t *, char *, char *, int); 898d7e4166Sjose borrego 908d7e4166Sjose borrego #ifdef __cplusplus 918d7e4166Sjose borrego } 928d7e4166Sjose borrego #endif 938d7e4166Sjose borrego 947f667e74Sjose borrego #endif /* _LSALIB_H */ 95