1 /* The following definitions come from rpc_client/cli_lsarpc.c */
4 * @brief Open a LSA policy.
6 * @param[in] h The dcerpc binding hanlde to use.
8 * @param[in] mem_ctx The memory context to use.
10 * @param[in] sec_qos Enable security quality of services.
12 * @param[in] des_access The disired access rights to be granted.
14 * @param[out] pol A pointer to a rpc policy handle.
16 * @param[out] result A pointer for the NDR NTSTATUS error code.
18 * @return A corresponding NTSTATUS error code for the connection.
20 NTSTATUS dcerpc_lsa_open_policy(struct dcerpc_binding_handle *h,
24 struct policy_handle *pol,
26 NTSTATUS rpccli_lsa_open_policy(struct rpc_pipe_client *cli,
28 bool sec_qos, uint32 des_access,
29 struct policy_handle *pol);
32 * @brief Open a LSA policy.
34 * @param[in] h The dcerpc binding hanlde to use.
36 * @param[in] mem_ctx The memory context to use.
38 * @param[in] sec_qos Enable security quality of services.
40 * @param[in] des_access The disired access rights to be granted.
42 * @param[out] pol A pointer to a rpc policy handle.
44 * @param[out] result A pointer for the NDR NTSTATUS error code.
46 * @return A corresponding NTSTATUS error code for the connection.
48 NTSTATUS dcerpc_lsa_open_policy2(struct dcerpc_binding_handle *h,
50 const char *srv_name_slash,
53 struct policy_handle *pol,
55 NTSTATUS rpccli_lsa_open_policy2(struct rpc_pipe_client *cli,
56 TALLOC_CTX *mem_ctx, bool sec_qos,
57 uint32 des_access, struct policy_handle *pol);
60 * @brief Look up the names that correspond to an array of sids.
62 * @param[in] h The initialized binding handle for a dcerpc connection.
64 * @param[in] mem_ctx The memory context to use.
66 * @param[in] pol The opened domain policy handle.
68 * @param[in] num_sids The number of sids in the sids array to look up.
70 * @param[in] sids The array of sids to look up.
72 * @param[out] pdomains A pointer to store the refercenced domains.
74 * @param[out] pnames A pointer to an array for the translated names.
76 * @param[out] ptypes A pointer to an array for the types of the names.
78 * @param[out] result A pointer for the conversion result.
80 * @return A corresponding NTSTATUS error code.
82 NTSTATUS dcerpc_lsa_lookup_sids(struct dcerpc_binding_handle *h,
84 struct policy_handle *pol,
86 const struct dom_sid *sids,
89 enum lsa_SidType **ptypes,
91 NTSTATUS rpccli_lsa_lookup_sids(struct rpc_pipe_client *cli,
93 struct policy_handle *pol,
95 const struct dom_sid *sids,
98 enum lsa_SidType **ptypes);
101 * @brief Look up the names that correspond to an array of sids.
103 * @param[in] h The initialized binding handle for a dcerpc connection.
105 * @param[in] mem_ctx The memory context to use.
107 * @param[in] pol The opened domain policy handle.
109 * @param[in] num_sids The number of sids in the sids array to look up.
111 * @param[in] sids The array of sids to look up.
113 * @param[out] pdomains A pointer to store the refercenced domains.
115 * @param[out] pnames A pointer to an array for the translated names.
117 * @param[out] ptypes A pointer to an array for the types of the names.
119 * @param[out] result A pointer for the conversion result.
121 * @return A corresponding NTSTATUS error code.
123 NTSTATUS dcerpc_lsa_lookup_sids3(struct dcerpc_binding_handle *h,
125 struct policy_handle *pol,
127 const struct dom_sid *sids,
130 enum lsa_SidType **ptypes,
132 NTSTATUS rpccli_lsa_lookup_sids3(struct rpc_pipe_client *cli,
134 struct policy_handle *pol,
136 const struct dom_sid *sids,
139 enum lsa_SidType **ptypes);
141 NTSTATUS rpccli_lsa_lookup_names(struct rpc_pipe_client *cli,
143 struct policy_handle *pol, int num_names,
145 const char ***dom_names,
147 struct dom_sid **sids,
148 enum lsa_SidType **types);
149 NTSTATUS rpccli_lsa_lookup_names4(struct rpc_pipe_client *cli,
151 struct policy_handle *pol, int num_names,
153 const char ***dom_names,
155 struct dom_sid **sids,
156 enum lsa_SidType **types);
158 bool fetch_domain_sid( char *domain, char *remote_machine, struct dom_sid *psid);