Author: jerry Date: 2006-09-27 21:37:43 +0000 (Wed, 27 Sep 2006) New Revision: 18964
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18964 Log: fix 'net rpc registry save' to use the new wnireg client code Modified: branches/SAMBA_3_0/source/utils/net_rpc_registry.c Changeset: Modified: branches/SAMBA_3_0/source/utils/net_rpc_registry.c =================================================================== --- branches/SAMBA_3_0/source/utils/net_rpc_registry.c 2006-09-27 19:03:54 UTC (rev 18963) +++ branches/SAMBA_3_0/source/utils/net_rpc_registry.c 2006-09-27 21:37:43 UTC (rev 18964) @@ -1,8 +1,9 @@ /* Samba Unix/Linux SMB client library Distributed SMB/CIFS Server Management Utility - Copyright (C) Gerald (Jerry) Carter 2005 + Copyright (C) Gerald (Jerry) Carter 2005-2006 + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or @@ -210,6 +211,7 @@ POLICY_HND pol_hive, pol_key; NTSTATUS status = NT_STATUS_UNSUCCESSFUL; struct winreg_String subkeyname; + struct winreg_String filename; if (argc != 2 ) { d_printf("Usage: net rpc backup <path> <file> \n"); @@ -237,19 +239,12 @@ return werror_to_ntstatus(result); } -#if 0 /* IDL not implemented */ - /* original call was: rpccli_reg_save_key(pipe_hnd, mem_ctx, &pol_key, argv[1] ); */ - - status = rpccli_winreg_SaveKey( cli, mem_ctx ); + filename.name = argv[1]; + status = rpccli_winreg_SaveKey( pipe_hnd, mem_ctx, &pol_key, &filename, NULL ); if ( !W_ERROR_IS_OK(result) ) { d_fprintf(stderr, "Unable to save [%s] to %s:%s\n", argv[0], cli->desthost, argv[1]); } -#else - d_printf("Call not implemented.\n"); - status = NT_STATUS_NOT_IMPLEMENTED; -#endif - /* cleanup */ rpccli_winreg_CloseKey(pipe_hnd, mem_ctx, &pol_key );