summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-04-04 17:50:41 +0200
committerMichael Adam <obnox@samba.org>2008-04-04 17:50:41 +0200
commitc7aa3dd3c052dd62e8dc9abdd033a8653ae27fbc (patch)
tree5c23966406cb195953e91a61f515b80f2a616ca0 /source3/utils
parentae790f9b89779a0fa1ba4ecfb5b99df160d222fd (diff)
downloadsamba-c7aa3dd3c052dd62e8dc9abdd033a8653ae27fbc.tar.gz
samba-c7aa3dd3c052dd62e8dc9abdd033a8653ae27fbc.tar.bz2
samba-c7aa3dd3c052dd62e8dc9abdd033a8653ae27fbc.zip
net_rpc_registry: consistently return error upon wrong use.
Michael (This used to be commit 26e3d71cd0b2d1bb31c50627ea71267328d52448)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_rpc_registry.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/utils/net_rpc_registry.c b/source3/utils/net_rpc_registry.c
index 92aaf06411..55585ec62b 100644
--- a/source3/utils/net_rpc_registry.c
+++ b/source3/utils/net_rpc_registry.c
@@ -629,7 +629,7 @@ static NTSTATUS rpc_registry_enumerate_internal(const DOM_SID *domain_sid,
if (argc != 1 ) {
d_printf("Usage: net rpc registry enumerate <path> [recurse]\n");
d_printf("Example: net rpc registry enumerate 'HKLM\\Software\\Samba'\n");
- return NT_STATUS_OK;
+ return NT_STATUS_INVALID_PARAMETER;
}
status = registry_openkey(mem_ctx, pipe_hnd, argv[0], REG_KEY_READ,
@@ -697,7 +697,7 @@ static NTSTATUS rpc_registry_save_internal(const DOM_SID *domain_sid,
if (argc != 2 ) {
d_printf("Usage: net rpc registry backup <path> <file> \n");
- return NT_STATUS_OK;
+ return NT_STATUS_INVALID_PARAMETER;
}
status = registry_openkey(mem_ctx, pipe_hnd, argv[0], REG_KEY_ALL,
@@ -882,7 +882,7 @@ static int rpc_registry_dump( int argc, const char **argv )
if (argc != 1 ) {
d_printf("Usage: net rpc registry dump <file> \n");
- return 0;
+ return -1;
}
d_printf("Opening %s....", argv[0]);
@@ -926,7 +926,7 @@ static int rpc_registry_copy( int argc, const char **argv )
if (argc != 2 ) {
d_printf("Usage: net rpc registry copy <srcfile> <newfile>\n");
- return 0;
+ return -1;
}
d_printf("Opening %s....", argv[0]);
@@ -997,7 +997,7 @@ static NTSTATUS rpc_registry_getsd_internal(const DOM_SID *domain_sid,
if (argc <1 || argc > 2) {
d_printf("Usage: net rpc registry getsd <path> <secinfo>\n");
d_printf("Example: net rpc registry getsd 'HKLM\\Software\\Samba'\n");
- return NT_STATUS_OK;
+ return NT_STATUS_INVALID_PARAMETER;
}
status = registry_openkey(mem_ctx, pipe_hnd, argv[0],