mirror of
https://github.com/samba-team/samba.git
synced 2025-12-10 04:23:50 +03:00
r19821: Make net_rpc_registry use net_run_function2.
Fix an erroneous NT_STATUS_NO_MEMORY found by Chetan S <cshring@gmail.com>. Thanks :-) Volker
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
b32c8356f7
commit
30f02e73fd
@@ -169,7 +169,7 @@ static NTSTATUS registry_enumkeys(TALLOC_CTX *ctx,
|
|||||||
|
|
||||||
classes[i] = NULL;
|
classes[i] = NULL;
|
||||||
|
|
||||||
if ((pclass_buf) &&
|
if (pclass_buf && pclass_buf->name &&
|
||||||
(!(classes[i] = talloc_strdup(classes,
|
(!(classes[i] = talloc_strdup(classes,
|
||||||
pclass_buf->name)))) {
|
pclass_buf->name)))) {
|
||||||
status = NT_STATUS_NO_MEMORY;
|
status = NT_STATUS_NO_MEMORY;
|
||||||
@@ -912,31 +912,21 @@ out:
|
|||||||
/********************************************************************
|
/********************************************************************
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
|
|
||||||
static int net_help_registry( int argc, const char **argv )
|
|
||||||
{
|
|
||||||
d_printf("net rpc registry enumerate <path> [recurse] Enumerate the subkeya and values for a given registry path\n");
|
|
||||||
d_printf("net rpc registry save <path> <file> Backup a registry tree to a file on the server\n");
|
|
||||||
d_printf("net rpc registry dump <file> Dump the contents of a registry file to stdout\n");
|
|
||||||
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/********************************************************************
|
|
||||||
********************************************************************/
|
|
||||||
|
|
||||||
int net_rpc_registry(int argc, const char **argv)
|
int net_rpc_registry(int argc, const char **argv)
|
||||||
{
|
{
|
||||||
struct functable func[] = {
|
struct functable2 func[] = {
|
||||||
{"enumerate", rpc_registry_enumerate},
|
{ "enumerate", rpc_registry_enumerate,
|
||||||
{"setvalue", rpc_registry_setvalue},
|
"Enumerate registry keys and values" },
|
||||||
{"save", rpc_registry_save},
|
{ "setvalue", rpc_registry_setvalue,
|
||||||
{"dump", rpc_registry_dump},
|
"Set a new registry value" },
|
||||||
{"copy", rpc_registry_copy},
|
{ "save", rpc_registry_save,
|
||||||
{NULL, NULL}
|
"Save a registry file" },
|
||||||
|
{ "dump", rpc_registry_dump,
|
||||||
|
"Dump a registry file" },
|
||||||
|
{ "copy", rpc_registry_copy,
|
||||||
|
"Copy a registry file" },
|
||||||
|
{NULL, NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
if ( argc )
|
return net_run_function2(argc, argv, "net rpc registry", func);
|
||||||
return net_run_function( argc, argv, func, net_help_registry );
|
|
||||||
|
|
||||||
return net_help_registry( argc, argv );
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user