summaryrefslogtreecommitdiff
path: root/source4/libcli/raw/rawacl.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-03 06:22:45 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-03 06:22:45 +0000
commitc5cf47443985c34ad32c44c322901e0fc3a065d7 (patch)
treef7d6abd03304c4f2359a4753aae23e41982c0e17 /source4/libcli/raw/rawacl.c
parent7fd381376f88ae99a4bf022d89f21ae497b48c1a (diff)
downloadsamba-c5cf47443985c34ad32c44c322901e0fc3a065d7.tar.gz
samba-c5cf47443985c34ad32c44c322901e0fc3a065d7.tar.bz2
samba-c5cf47443985c34ad32c44c322901e0fc3a065d7.zip
a major revamp of the low level dcerpc code in samba4, We can now do a
successful LSA OpenPolicy using smbtorture (This used to be commit e925c315f55905060fcca1b188ae1f7e40baf514)
Diffstat (limited to 'source4/libcli/raw/rawacl.c')
-rw-r--r--source4/libcli/raw/rawacl.c52
1 files changed, 48 insertions, 4 deletions
diff --git a/source4/libcli/raw/rawacl.c b/source4/libcli/raw/rawacl.c
index 4cd3338ec5..c45152381d 100644
--- a/source4/libcli/raw/rawacl.c
+++ b/source4/libcli/raw/rawacl.c
@@ -58,7 +58,7 @@ NTSTATUS smb_raw_query_secdesc_recv(struct cli_request *req,
{
NTSTATUS status;
struct smb_nttrans nt;
- struct ndr_parse *rpc;
+ struct ndr_pull *ndr;
status = smb_raw_nttrans_recv(req, mem_ctx, &nt);
if (!NT_STATUS_IS_OK(status)) {
@@ -73,12 +73,12 @@ NTSTATUS smb_raw_query_secdesc_recv(struct cli_request *req,
nt.out.data.length = IVAL(nt.out.params.data, 0);
- rpc = ndr_parse_init_blob(&nt.out.data, mem_ctx);
- if (!rpc) {
+ ndr = ndr_pull_init_blob(&nt.out.data, mem_ctx);
+ if (!ndr) {
return NT_STATUS_INVALID_PARAMETER;
}
- status = ndr_parse_security_descriptor(rpc, &query->out.sd);
+ status = ndr_pull_security_descriptor(ndr, &query->out.sd);
return NT_STATUS_OK;
}
@@ -95,3 +95,47 @@ NTSTATUS smb_raw_query_secdesc(struct cli_tree *tree,
return smb_raw_query_secdesc_recv(req, mem_ctx, query);
}
+
+
+/****************************************************************************
+set file ACL (async send)
+****************************************************************************/
+struct cli_request *smb_raw_set_secdesc_send(struct cli_tree *tree,
+ struct smb_set_secdesc *set)
+{
+ struct smb_nttrans nt;
+ uint8 params[8];
+ struct ndr_push *ndr;
+ struct cli_request *req;
+ NTSTATUS status;
+
+ nt.in.max_setup = 0;
+ nt.in.max_param = 0;
+ nt.in.max_data = 0;
+ nt.in.setup_count = 0;
+ nt.in.function = NT_TRANSACT_SET_SECURITY_DESC;
+ nt.in.setup = NULL;
+
+ SSVAL(params, 0, set->in.fnum);
+ SSVAL(params, 2, 0); /* padding */
+ SIVAL(params, 4, set->in.secinfo_flags);
+
+ nt.in.params.data = params;
+ nt.in.params.length = 8;
+
+ ndr = ndr_push_init();
+ if (!ndr) return NULL;
+
+// status = ndr_push_security_descriptor(ndr, set->in.sd);
+ if (!NT_STATUS_IS_OK(status)) {
+ ndr_push_free(ndr);
+ return NULL;
+ }
+
+ nt.in.data = ndr_push_blob(ndr);
+
+ req = smb_raw_nttrans_send(tree, &nt);
+
+ ndr_push_free(ndr);
+ return req;
+}