1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
/* The following definitions come from rpc_client/cli_lsarpc.c */
/**
* @brief Open a LSA policy.
*
* @param[in] h The dcerpc binding hanlde to use.
*
* @param[in] mem_ctx The memory context to use.
*
* @param[in] sec_qos Enable security quality of services.
*
* @param[in] des_access The disired access rights to be granted.
*
* @param[out] pol A pointer to a rpc policy handle.
*
* @param[out] result A pointer for the NDR NTSTATUS error code.
*
* @return A corresponding NTSTATUS error code for the connection.
*/
NTSTATUS dcerpc_lsa_open_policy(struct dcerpc_binding_handle *h,
TALLOC_CTX *mem_ctx,
bool sec_qos,
uint32_t des_access,
struct policy_handle *pol,
NTSTATUS *result);
NTSTATUS rpccli_lsa_open_policy(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
bool sec_qos, uint32 des_access,
struct policy_handle *pol);
/**
* @brief Open a LSA policy.
*
* @param[in] h The dcerpc binding hanlde to use.
*
* @param[in] mem_ctx The memory context to use.
*
* @param[in] sec_qos Enable security quality of services.
*
* @param[in] des_access The disired access rights to be granted.
*
* @param[out] pol A pointer to a rpc policy handle.
*
* @param[out] result A pointer for the NDR NTSTATUS error code.
*
* @return A corresponding NTSTATUS error code for the connection.
*/
NTSTATUS dcerpc_lsa_open_policy2(struct dcerpc_binding_handle *h,
TALLOC_CTX *mem_ctx,
const char *srv_name_slash,
bool sec_qos,
uint32_t des_access,
struct policy_handle *pol,
NTSTATUS *result);
NTSTATUS rpccli_lsa_open_policy2(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx, bool sec_qos,
uint32 des_access, struct policy_handle *pol);
NTSTATUS rpccli_lsa_lookup_sids(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *pol,
int num_sids,
const struct dom_sid *sids,
char ***pdomains,
char ***pnames,
enum lsa_SidType **ptypes);
NTSTATUS rpccli_lsa_lookup_sids3(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *pol,
int num_sids,
const struct dom_sid *sids,
char ***pdomains,
char ***pnames,
enum lsa_SidType **ptypes);
NTSTATUS rpccli_lsa_lookup_names(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *pol, int num_names,
const char **names,
const char ***dom_names,
int level,
struct dom_sid **sids,
enum lsa_SidType **types);
NTSTATUS rpccli_lsa_lookup_names4(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *pol, int num_names,
const char **names,
const char ***dom_names,
int level,
struct dom_sid **sids,
enum lsa_SidType **types);
bool fetch_domain_sid( char *domain, char *remote_machine, struct dom_sid *psid);
|