summaryrefslogtreecommitdiff
path: root/source3/rpc_client/cli_lsarpc.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2008-02-01 14:24:31 -0500
committerSimo Sorce <idra@samba.org>2008-02-01 14:24:31 -0500
commit2fffc9a1b1fe2a1490e867bb38462e50c282d2b3 (patch)
tree428e09c9b35138db8b7ca7161c659a71aa129d29 /source3/rpc_client/cli_lsarpc.c
parent93a3c5b3f9927973b4ad1496f593ea147052d1e1 (diff)
parentb708005a7106db26d7df689b887b419c9f2ea41c (diff)
downloadsamba-2fffc9a1b1fe2a1490e867bb38462e50c282d2b3.tar.gz
samba-2fffc9a1b1fe2a1490e867bb38462e50c282d2b3.tar.bz2
samba-2fffc9a1b1fe2a1490e867bb38462e50c282d2b3.zip
Merge branch 'v3-2-test' of ssh://git.samba.org/data/git/samba into v3-2-test
(This used to be commit 7dbfc7bdc65314466a83e8121b35c9bcb24b2631)
Diffstat (limited to 'source3/rpc_client/cli_lsarpc.c')
-rw-r--r--source3/rpc_client/cli_lsarpc.c262
1 files changed, 5 insertions, 257 deletions
diff --git a/source3/rpc_client/cli_lsarpc.c b/source3/rpc_client/cli_lsarpc.c
index 6abc67fc35..286cc210e2 100644
--- a/source3/rpc_client/cli_lsarpc.c
+++ b/source3/rpc_client/cli_lsarpc.c
@@ -542,7 +542,8 @@ NTSTATUS rpccli_lsa_query_info_policy2_new(struct rpc_pipe_client *cli, TALLOC_C
NTSTATUS rpccli_lsa_query_info_policy(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
POLICY_HND *pol, uint16 info_class,
- char **domain_name, DOM_SID **domain_sid)
+ const char **domain_name,
+ DOM_SID **domain_sid)
{
prs_struct qbuf, rbuf;
LSA_Q_QUERY_INFO q;
@@ -632,8 +633,9 @@ NTSTATUS rpccli_lsa_query_info_policy(struct rpc_pipe_client *cli,
NTSTATUS rpccli_lsa_query_info_policy2(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
POLICY_HND *pol, uint16 info_class,
- char **domain_name, char **dns_name,
- char **forest_name,
+ const char **domain_name,
+ const char **dns_name,
+ const char **forest_name,
struct GUID **domain_guid,
DOM_SID **domain_sid)
{
@@ -716,41 +718,6 @@ NTSTATUS rpccli_lsa_query_info_policy2(struct rpc_pipe_client *cli,
return result;
}
-NTSTATUS rpccli_lsa_set_info_policy(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *pol, uint16 info_class,
- LSA_INFO_CTR ctr)
-{
- prs_struct qbuf, rbuf;
- LSA_Q_SET_INFO q;
- LSA_R_SET_INFO r;
- NTSTATUS result;
-
- ZERO_STRUCT(q);
- ZERO_STRUCT(r);
-
- init_q_set(&q, pol, info_class, ctr);
-
- CLI_DO_RPC(cli, mem_ctx, PI_LSARPC, LSA_SETINFOPOLICY,
- q, r,
- qbuf, rbuf,
- lsa_io_q_set,
- lsa_io_r_set,
- NT_STATUS_UNSUCCESSFUL);
-
- result = r.status;
-
- if (!NT_STATUS_IS_OK(result)) {
- goto done;
- }
-
- /* Return output parameters */
-
- done:
-
- return result;
-}
-
-
/**
* Enumerate list of trusted domains
*
@@ -1468,222 +1435,3 @@ Error was : %s.\n", remote_machine, cli_errstr(&cli) ));
}
#endif
-
-NTSTATUS rpccli_lsa_open_trusted_domain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *pol, DOM_SID *dom_sid, uint32 access_mask,
- POLICY_HND *trustdom_pol)
-{
- prs_struct qbuf, rbuf;
- LSA_Q_OPEN_TRUSTED_DOMAIN q;
- LSA_R_OPEN_TRUSTED_DOMAIN r;
- NTSTATUS result;
-
- ZERO_STRUCT(q);
- ZERO_STRUCT(r);
-
- /* Initialise input parameters */
-
- init_lsa_q_open_trusted_domain(&q, pol, dom_sid, access_mask);
-
- /* Marshall data and send request */
-
- CLI_DO_RPC( cli, mem_ctx, PI_LSARPC, LSA_OPENTRUSTDOM,
- q, r,
- qbuf, rbuf,
- lsa_io_q_open_trusted_domain,
- lsa_io_r_open_trusted_domain,
- NT_STATUS_UNSUCCESSFUL);
-
- /* Return output parameters */
-
- result = r.status;
-
- if (NT_STATUS_IS_OK(result)) {
- *trustdom_pol = r.handle;
- }
-
- return result;
-}
-
-NTSTATUS rpccli_lsa_query_trusted_domain_info(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *pol,
- uint16 info_class,
- LSA_TRUSTED_DOMAIN_INFO **info)
-{
- prs_struct qbuf, rbuf;
- LSA_Q_QUERY_TRUSTED_DOMAIN_INFO q;
- LSA_R_QUERY_TRUSTED_DOMAIN_INFO r;
- NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
-
- ZERO_STRUCT(q);
- ZERO_STRUCT(r);
-
- /* Marshall data and send request */
-
- init_q_query_trusted_domain_info(&q, pol, info_class);
-
- CLI_DO_RPC( cli, mem_ctx, PI_LSARPC, LSA_QUERYTRUSTDOMINFO,
- q, r,
- qbuf, rbuf,
- lsa_io_q_query_trusted_domain_info,
- lsa_io_r_query_trusted_domain_info,
- NT_STATUS_UNSUCCESSFUL);
-
- result = r.status;
-
- if (!NT_STATUS_IS_OK(result)) {
- goto done;
- }
-
- *info = r.info;
-
-done:
- return result;
-}
-
-NTSTATUS rpccli_lsa_open_trusted_domain_by_name(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *pol, const char *name, uint32 access_mask,
- POLICY_HND *trustdom_pol)
-{
- prs_struct qbuf, rbuf;
- LSA_Q_OPEN_TRUSTED_DOMAIN_BY_NAME q;
- LSA_R_OPEN_TRUSTED_DOMAIN_BY_NAME r;
- NTSTATUS result;
-
- ZERO_STRUCT(q);
- ZERO_STRUCT(r);
-
- /* Initialise input parameters */
-
- init_lsa_q_open_trusted_domain_by_name(&q, pol, name, access_mask);
-
- /* Marshall data and send request */
-
- CLI_DO_RPC( cli, mem_ctx, PI_LSARPC, LSA_OPENTRUSTDOMBYNAME,
- q, r,
- qbuf, rbuf,
- lsa_io_q_open_trusted_domain_by_name,
- lsa_io_r_open_trusted_domain_by_name,
- NT_STATUS_UNSUCCESSFUL);
-
- /* Return output parameters */
-
- result = r.status;
-
- if (NT_STATUS_IS_OK(result)) {
- *trustdom_pol = r.handle;
- }
-
- return result;
-}
-
-
-NTSTATUS rpccli_lsa_query_trusted_domain_info_by_sid(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *pol,
- uint16 info_class, DOM_SID *dom_sid,
- LSA_TRUSTED_DOMAIN_INFO **info)
-{
- prs_struct qbuf, rbuf;
- LSA_Q_QUERY_TRUSTED_DOMAIN_INFO_BY_SID q;
- LSA_R_QUERY_TRUSTED_DOMAIN_INFO r;
- NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
-
- ZERO_STRUCT(q);
- ZERO_STRUCT(r);
-
- /* Marshall data and send request */
-
- init_q_query_trusted_domain_info_by_sid(&q, pol, info_class, dom_sid);
-
- CLI_DO_RPC( cli, mem_ctx, PI_LSARPC, LSA_QUERYTRUSTDOMINFOBYSID,
- q, r,
- qbuf, rbuf,
- lsa_io_q_query_trusted_domain_info_by_sid,
- lsa_io_r_query_trusted_domain_info,
- NT_STATUS_UNSUCCESSFUL);
-
- result = r.status;
-
- if (!NT_STATUS_IS_OK(result)) {
- goto done;
- }
-
- *info = r.info;
-
-done:
-
- return result;
-}
-
-NTSTATUS rpccli_lsa_query_trusted_domain_info_by_name(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *pol,
- uint16 info_class, const char *domain_name,
- LSA_TRUSTED_DOMAIN_INFO **info)
-{
- prs_struct qbuf, rbuf;
- LSA_Q_QUERY_TRUSTED_DOMAIN_INFO_BY_NAME q;
- LSA_R_QUERY_TRUSTED_DOMAIN_INFO r;
- NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
-
- ZERO_STRUCT(q);
- ZERO_STRUCT(r);
-
- /* Marshall data and send request */
-
- init_q_query_trusted_domain_info_by_name(&q, pol, info_class, domain_name);
-
- CLI_DO_RPC( cli, mem_ctx, PI_LSARPC, LSA_QUERYTRUSTDOMINFOBYNAME,
- q, r,
- qbuf, rbuf,
- lsa_io_q_query_trusted_domain_info_by_name,
- lsa_io_r_query_trusted_domain_info,
- NT_STATUS_UNSUCCESSFUL);
-
- result = r.status;
-
- if (!NT_STATUS_IS_OK(result)) {
- goto done;
- }
-
- *info = r.info;
-
-done:
-
- return result;
-}
-
-NTSTATUS cli_lsa_query_domain_info_policy(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *pol,
- uint16 info_class, LSA_DOM_INFO_UNION **info)
-{
- prs_struct qbuf, rbuf;
- LSA_Q_QUERY_DOM_INFO_POLICY q;
- LSA_R_QUERY_DOM_INFO_POLICY r;
- NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
-
- ZERO_STRUCT(q);
- ZERO_STRUCT(r);
-
- /* Marshall data and send request */
-
- init_q_query_dom_info(&q, pol, info_class);
-
- CLI_DO_RPC( cli, mem_ctx, PI_LSARPC, LSA_QUERYDOMINFOPOL,
- q, r,
- qbuf, rbuf,
- lsa_io_q_query_dom_info,
- lsa_io_r_query_dom_info,
- NT_STATUS_UNSUCCESSFUL);
-
- result = r.status;
-
- if (!NT_STATUS_IS_OK(result)) {
- goto done;
- }
-
- *info = r.info;
-
-done:
- return result;
-}
-