summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2006-03-06 15:22:00 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:10:57 -0500
commit9f2e29799eac96068fa033bdc4a9df5a82ec470d (patch)
treeb114323235b5e5e0ee8869f5dc1fa68272258955 /source3/rpc_client
parent105825cf5a0de9f270e140910d1376d6c43d57a7 (diff)
downloadsamba-9f2e29799eac96068fa033bdc4a9df5a82ec470d.tar.gz
samba-9f2e29799eac96068fa033bdc4a9df5a82ec470d.tar.bz2
samba-9f2e29799eac96068fa033bdc4a9df5a82ec470d.zip
r13864: Some cleanup and the samr set security object function client-side.
Guenther (This used to be commit 0ae3fddf95a95ec8a2f4d52e1276c1721b33ddfd)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/cli_samr.c39
1 files changed, 37 insertions, 2 deletions
diff --git a/source3/rpc_client/cli_samr.c b/source3/rpc_client/cli_samr.c
index adb61a48bb..07b876cc22 100644
--- a/source3/rpc_client/cli_samr.c
+++ b/source3/rpc_client/cli_samr.c
@@ -1808,7 +1808,7 @@ NTSTATUS rpccli_samr_remove_sid_foreign_domain(struct rpc_pipe_client *cli,
/* Query user security object */
NTSTATUS rpccli_samr_query_sec_obj(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *user_pol, uint16 switch_value,
+ POLICY_HND *user_pol, uint32 sec_info,
TALLOC_CTX *ctx, SEC_DESC_BUF **sec_desc_buf)
{
prs_struct qbuf, rbuf;
@@ -1823,7 +1823,7 @@ NTSTATUS rpccli_samr_query_sec_obj(struct rpc_pipe_client *cli, TALLOC_CTX *mem_
/* Marshall data and send request */
- init_samr_q_query_sec_obj(&q, user_pol, switch_value);
+ init_samr_q_query_sec_obj(&q, user_pol, sec_info);
CLI_DO_RPC(cli, mem_ctx, PI_SAMR, SAMR_QUERY_SEC_OBJECT,
q, r,
@@ -1840,6 +1840,41 @@ NTSTATUS rpccli_samr_query_sec_obj(struct rpc_pipe_client *cli, TALLOC_CTX *mem_
return result;
}
+/* Set user security object */
+
+NTSTATUS rpccli_samr_set_sec_obj(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
+ POLICY_HND *user_pol, uint32 sec_info,
+ SEC_DESC_BUF *sec_desc_buf)
+{
+ prs_struct qbuf, rbuf;
+ SAMR_Q_SET_SEC_OBJ q;
+ SAMR_R_SET_SEC_OBJ r;
+ NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+
+ DEBUG(10,("cli_samr_set_sec_obj\n"));
+
+ ZERO_STRUCT(q);
+ ZERO_STRUCT(r);
+
+ /* Marshall data and send request */
+
+ init_samr_q_set_sec_obj(&q, user_pol, sec_info, sec_desc_buf);
+
+ CLI_DO_RPC(cli, mem_ctx, PI_SAMR, SAMR_SET_SEC_OBJECT,
+ q, r,
+ qbuf, rbuf,
+ samr_io_q_set_sec_obj,
+ samr_io_r_set_sec_obj,
+ NT_STATUS_UNSUCCESSFUL);
+
+ /* Return output parameters */
+
+ result = r.status;
+
+ return result;
+}
+
+
/* Get domain password info */
NTSTATUS rpccli_samr_get_dom_pwinfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,