diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-08-24 08:31:39 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:34:29 -0500 |
commit | 649882d8d59f35cf51166bedd73c2eab4cea7e50 (patch) | |
tree | 529e7f87274b3a9ef49d34176e407fe1133f471c /source4/lib/registry/reg_backend_rpc.c | |
parent | cfa981c65667fb63c2c2af8a48149dc6e89f461c (diff) | |
download | samba-649882d8d59f35cf51166bedd73c2eab4cea7e50.tar.gz samba-649882d8d59f35cf51166bedd73c2eab4cea7e50.tar.bz2 samba-649882d8d59f35cf51166bedd73c2eab4cea7e50.zip |
r9567: fixed the winreg IDL for CreateKey, including a security
descriptor. To keep it simple I just use normal IDL buffers for now,
avoiding the complex methods metze used in spoolss. We might change
that later
Also added decoding of the security_descriptor in
winreg_GetKeySecurity() in smbtorture
(This used to be commit 439f34a9621e2e96329c30cfed8d78b8fdfbd8a2)
Diffstat (limited to 'source4/lib/registry/reg_backend_rpc.c')
-rw-r--r-- | source4/lib/registry/reg_backend_rpc.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/source4/lib/registry/reg_backend_rpc.c b/source4/lib/registry/reg_backend_rpc.c index 5734b96770..44de3bcd77 100644 --- a/source4/lib/registry/reg_backend_rpc.c +++ b/source4/lib/registry/reg_backend_rpc.c @@ -29,14 +29,7 @@ static struct hive_operations reg_backend_rpc; static void init_winreg_String(struct winreg_String *name, const char *s) { - name->name = s; - if (s) { - name->name_len = 2 * (strlen_m(s) + 1); - name->name_size = name->name_len; - } else { - name->name_len = 0; - name->name_size = 0; - } + name->name = s; } @@ -255,14 +248,14 @@ static WERROR rpc_add_key(TALLOC_CTX *mem_ctx, struct registry_key *parent, cons NTSTATUS status; struct winreg_CreateKey r; - init_winreg_String(&r.in.key, name); + init_winreg_String(&r.in.name, name); init_winreg_String(&r.in.class, NULL); r.in.handle = parent->backend_data; - r.out.handle = talloc(mem_ctx, struct policy_handle); + r.out.new_handle = talloc(mem_ctx, struct policy_handle); r.in.options = 0; - r.in.access_mask = access_mask; - r.in.sec_desc = NULL; + r.in.access_required = access_mask; + r.in.secdesc = NULL; status = dcerpc_winreg_CreateKey((struct dcerpc_pipe *)(parent->hive->backend_data), mem_ctx, &r); @@ -274,7 +267,7 @@ static WERROR rpc_add_key(TALLOC_CTX *mem_ctx, struct registry_key *parent, cons if (W_ERROR_IS_OK(r.out.result)) { *key = talloc(mem_ctx, struct registry_key); (*key)->name = talloc_strdup(*key, name); - (*key)->backend_data = r.out.handle; + (*key)->backend_data = r.out.new_handle; } return r.out.result; |