diff options
author | Michael Adam <obnox@samba.org> | 2008-05-15 16:49:25 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-05-15 17:17:56 +0200 |
commit | abafce6ba7defe59b2526855551264493b50f1db (patch) | |
tree | 6019305d089c545c68b23a400c2425cd8d46c152 /source3/utils | |
parent | 301196f847cf51c3d94f176ab57abb95be0cad35 (diff) | |
download | samba-abafce6ba7defe59b2526855551264493b50f1db.tar.gz samba-abafce6ba7defe59b2526855551264493b50f1db.tar.bz2 samba-abafce6ba7defe59b2526855551264493b50f1db.zip |
net rpc registry: add a getvalueraw subcommand.
Michael
(This used to be commit 5b5b29302b53c31256dfa2fdefead458cb14c560)
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/net_rpc_registry.c | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/source3/utils/net_rpc_registry.c b/source3/utils/net_rpc_registry.c index a453dc5d5c..a23caf5773 100644 --- a/source3/utils/net_rpc_registry.c +++ b/source3/utils/net_rpc_registry.c @@ -580,6 +580,33 @@ done: return status; } +static NTSTATUS rpc_registry_getvalue_full(struct net_context *c, + const DOM_SID *domain_sid, + const char *domain_name, + struct cli_state *cli, + struct rpc_pipe_client *pipe_hnd, + TALLOC_CTX *mem_ctx, + int argc, + const char **argv) +{ + return rpc_registry_getvalue_internal(c, domain_sid, domain_name, + cli, pipe_hnd, mem_ctx, false, + argc, argv); +} + +static int rpc_registry_getvalue(struct net_context *c, int argc, + const char **argv) +{ + if (argc != 2) { + d_fprintf(stderr, "usage: net rpc registry getvalue <key> " + "<valuename>\n"); + return -1; + } + + return run_rpc_command(c, NULL, PI_WINREG, 0, + rpc_registry_getvalue_full, argc, argv); +} + static NTSTATUS rpc_registry_getvalue_raw(struct net_context *c, const DOM_SID *domain_sid, const char *domain_name, @@ -590,12 +617,12 @@ static NTSTATUS rpc_registry_getvalue_raw(struct net_context *c, const char **argv) { return rpc_registry_getvalue_internal(c, domain_sid, domain_name, - cli, pipe_hnd, mem_ctx, false, + cli, pipe_hnd, mem_ctx, true, argc, argv); } -static int rpc_registry_getvalue(struct net_context *c, int argc, - const char **argv) +static int rpc_registry_getvalueraw(struct net_context *c, int argc, + const char **argv) { if (argc != 2) { d_fprintf(stderr, "usage: net rpc registry getvalue <key> " @@ -1197,6 +1224,8 @@ int net_rpc_registry(struct net_context *c, int argc, const char **argv) "Delete a registry key" }, { "getvalue", rpc_registry_getvalue, "Print a registry value" }, + { "getvalueraw", rpc_registry_getvalueraw, + "Print a registry value" }, { "setvalue", rpc_registry_setvalue, "Set a new registry value" }, { "deletevalue", rpc_registry_deletevalue, |