2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License (the "License").
2N/A * You may not use this file except in compliance with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A * If applicable, add the following below this CDDL HEADER, with the
2N/A * fields enclosed by brackets "[]" replaced with your own identifying
2N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2N/A *
2N/A * CDDL HEADER END
2N/A */
2N/A/*
2N/A * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
2N/A */
2N/A
2N/A#ifndef _LSALIB_H
2N/A#define _LSALIB_H
2N/A
2N/A/*
2N/A * Prototypes for the LSA library and RPC client side library interface.
2N/A * There are two levels of interface defined here: lsa_xxx and lsar_xxx.
2N/A * The lsa_xxx functions provide a high level interface which make
2N/A * multiple RPC calls and do all the work necessary to obtain and return
2N/A * the requested information. The lsar_xxx functions provide a low level
2N/A * interface in which each function maps to a single underlying RPC.
2N/A */
2N/A
2N/A#include <smbsrv/ndl/lsarpc.ndl>
2N/A#include <smbsrv/libsmb.h>
2N/A#include <smbsrv/libntsvcs.h>
2N/A#include <smb/smb_sid.h>
2N/A
2N/A
2N/A#ifdef __cplusplus
2N/Aextern "C" {
2N/A#endif
2N/A
2N/Atypedef struct mslsa_sid lsa_sid_t;
2N/A
2N/A/*
2N/A * Lookup a SMB account given a key where key can be an account name, a SID,
2N/A * etc.
2N/A *
2N/A * l_func - the actual LSA lookup call.
2N/A * l_key - the key for the specified lookup (input argument).
2N/A * l_acct - the SMB account associated with the specified key (output argument)
2N/A */
2N/Atypedef struct lsar_lookup_op {
2N/A uint32_t (*l_func)(mlsvc_handle_t *, void *, smb_account_t *);
2N/A void *l_key;
2N/A smb_account_t *l_acct;
2N/A} lsar_lookup_op_t;
2N/A
2N/Auint32_t lsar_lookup(lsar_lookup_op_t *);
2N/A
2N/Aint lsar_open(char *, char *, char *, mlsvc_handle_t *);
2N/Aint lsar_open_account(mlsvc_handle_t *, struct mslsa_sid *, mlsvc_handle_t *);
2N/Aint lsar_close(mlsvc_handle_t *);
2N/A
2N/Aint lsar_query_security_desc(mlsvc_handle_t *);
2N/ADWORD lsar_query_info_policy(mlsvc_handle_t *, WORD, smb_domain_t *);
2N/Auint32_t lsar_lookup_names(mlsvc_handle_t *, void *, smb_account_t *);
2N/Auint32_t lsar_lookup_sids(mlsvc_handle_t *, void *, smb_account_t *);
2N/A
2N/Aint lsar_enum_accounts(mlsvc_handle_t *, DWORD *,
2N/A struct mslsa_EnumAccountBuf *);
2N/ADWORD lsar_enum_trusted_domains(mlsvc_handle_t *, DWORD *,
2N/A smb_trusted_domains_t *);
2N/ADWORD lsar_enum_trusted_domains_ex(mlsvc_handle_t *, DWORD *,
2N/A smb_trusted_domains_t *);
2N/Aint lsar_enum_privs_account(mlsvc_handle_t *, smb_account_t *);
2N/Aint lsar_lookup_priv_value(mlsvc_handle_t *, char *, struct ms_luid *);
2N/Aint lsar_lookup_priv_name(mlsvc_handle_t *, struct ms_luid *, char *, int);
2N/ADWORD lsar_lookup_priv_display_name(mlsvc_handle_t *, char *, char *, int);
2N/A
2N/A#ifdef __cplusplus
2N/A}
2N/A#endif
2N/A
2N/A#endif /* _LSALIB_H */