summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2008-09-13 15:02:56 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-09-21 23:17:59 +0200
commit04f29b84a4bf2378d326b86a983792095231922e (patch)
tree65dbc7d6009dc2c30f4822a3590b261350806ea4
parent1e178ffc03456064bfd2ec330b9b6b6217c8561d (diff)
downloadsamba-04f29b84a4bf2378d326b86a983792095231922e.tar.gz
samba-04f29b84a4bf2378d326b86a983792095231922e.tar.bz2
samba-04f29b84a4bf2378d326b86a983792095231922e.zip
Registry client library: Fixes the creation of new keys
Giving the right permissions
-rw-r--r--source4/lib/registry/rpc.c2
-rw-r--r--source4/lib/registry/tools/regshell.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/source4/lib/registry/rpc.c b/source4/lib/registry/rpc.c
index 7469bb60d8..69da90128e 100644
--- a/source4/lib/registry/rpc.c
+++ b/source4/lib/registry/rpc.c
@@ -348,7 +348,7 @@ static WERROR rpc_add_key(TALLOC_CTX *mem_ctx,
chars_to_winreg_String(mem_ctx, &r.in.name, name);
chars_to_winreg_String(mem_ctx, &r.in.keyclass, NULL);
r.in.options = 0;
- r.in.access_mask = SEC_STD_ALL;
+ r.in.access_mask = 0x02000000;
r.in.secdesc = NULL;
r.in.action_taken = NULL;
r.out.new_handle = &rpck->pol;
diff --git a/source4/lib/registry/tools/regshell.c b/source4/lib/registry/tools/regshell.c
index 208b19fba8..5c308bfbda 100644
--- a/source4/lib/registry/tools/regshell.c
+++ b/source4/lib/registry/tools/regshell.c
@@ -246,7 +246,8 @@ static WERROR cmd_mkkey(struct regshell_context *ctx, int argc, char **argv)
error = reg_key_add_name(ctx, ctx->current, argv[1], 0, NULL, &tmp);
if (!W_ERROR_IS_OK(error)) {
- fprintf(stderr, "Error adding new subkey '%s'\n", argv[1]);
+ fprintf(stderr, "Error adding new subkey '%s': %s\n", argv[1],
+ win_errstr(error));
return error;
}