view usr/src/lib/smbsrv/libmlsvc/common/lsalib.h @ 10717:fe0545fc3cdd

6612607 CIFS ADS client should use ldap_sasl_interactive_bind_s API 6877755 smbd should not route stderr, stdout to /dev/null 6882701 Wrong error message for attempt to map local user to Windows group, or vice versa 6885105 Potential for deadlock in smb_node_set_delete_on_close() 6881928 smbd core generated when running a script to join domain, set abe properties 6885538 Reduce dependencies on libsmbrdr 6820325 cifs service can't start on multi vlan+ipmp configuration
author Alan Wright <amw@Sun.COM>
date Mon, 05 Oct 2009 11:03:34 -0700
parents 3569b6c7f56c
children 1f8fe42c7b83
line wrap: on
line source

/*
 * CDDL HEADER START
 *
 * The contents of this file are subject to the terms of the
 * Common Development and Distribution License (the "License").
 * You may not use this file except in compliance with the License.
 *
 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
 * or http://www.opensolaris.org/os/licensing.
 * See the License for the specific language governing permissions
 * and limitations under the License.
 *
 * When distributing Covered Code, include this CDDL HEADER in each
 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
 * If applicable, add the following below this CDDL HEADER, with the
 * fields enclosed by brackets "[]" replaced with your own identifying
 * information: Portions Copyright [yyyy] [name of copyright owner]
 *
 * CDDL HEADER END
 */
/*
 * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
 * Use is subject to license terms.
 */

#ifndef _LSALIB_H
#define	_LSALIB_H

/*
 * Prototypes for the LSA library and RPC client side library interface.
 * There are two levels of interface defined here: lsa_xxx and lsar_xxx.
 * The lsa_xxx functions provide a high level interface which make
 * multiple RPC calls and do all the work necessary to obtain and return
 * the requested information. The lsar_xxx functions provide a low level
 * interface in which each function maps to a single underlying RPC.
 */

#include <smbsrv/ndl/lsarpc.ndl>
#include <smbsrv/libsmb.h>
#include <smbsrv/libmlsvc.h>
#include <smbsrv/smb_sid.h>


#ifdef __cplusplus
extern "C" {
#endif

/*
 * lsalib.c
 */
uint32_t lsa_lookup_name(char *, uint16_t, smb_account_t *);
uint32_t lsa_lookup_sid(smb_sid_t *, smb_account_t *);
DWORD lsa_query_primary_domain_info(char *, char *, smb_domain_t *);
DWORD lsa_query_account_domain_info(char *, char *, smb_domain_t *);
DWORD lsa_query_dns_domain_info(char *, char *, smb_domain_t *);
DWORD lsa_enum_trusted_domains(char *, char *, smb_trusted_domains_t *);
DWORD lsa_enum_trusted_domains_ex(char *, char *, smb_trusted_domains_t *);

/*
 * lsar_open.c
 */
int lsar_open(char *, char *, char *, mlsvc_handle_t *);
int lsar_open_policy2(char *, char *, char *, mlsvc_handle_t *);
int lsar_open_account(mlsvc_handle_t *, struct mslsa_sid *, mlsvc_handle_t *);
int lsar_close(mlsvc_handle_t *);

/*
 * lsar_lookup.c
 */
int lsar_query_security_desc(mlsvc_handle_t *);
DWORD lsar_query_info_policy(mlsvc_handle_t *, WORD, smb_domain_t *);
uint32_t lsar_lookup_names(mlsvc_handle_t *, char *, smb_account_t *);
uint32_t lsar_lookup_names2(mlsvc_handle_t *, char *, smb_account_t *);
uint32_t lsar_lookup_sids(mlsvc_handle_t *, struct mslsa_sid *,
    smb_account_t *);
uint32_t lsar_lookup_sids2(mlsvc_handle_t *, struct mslsa_sid *,
    smb_account_t *);

int lsar_enum_accounts(mlsvc_handle_t *, DWORD *,
    struct mslsa_EnumAccountBuf *);
DWORD lsar_enum_trusted_domains(mlsvc_handle_t *, DWORD *,
    smb_trusted_domains_t *);
DWORD lsar_enum_trusted_domains_ex(mlsvc_handle_t *, DWORD *,
    smb_trusted_domains_t *);
int lsar_enum_privs_account(mlsvc_handle_t *, smb_account_t *);
int lsar_lookup_priv_value(mlsvc_handle_t *, char *, struct  ms_luid *);
int lsar_lookup_priv_name(mlsvc_handle_t *, struct  ms_luid *, char *, int);
DWORD lsar_lookup_priv_display_name(mlsvc_handle_t *, char *, char *, int);

#ifdef __cplusplus
}
#endif

#endif /* _LSALIB_H */