From 7ec83f7d1943422edba88d587f79b4356e5afbfa Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnther=20Deschner?= Date: Thu, 4 Sep 2008 15:44:50 +0200 Subject: [PATCH] net: use netapi for deleting shares. Guenther (cherry picked from commit d7b07b636947cb52aa5474e86c4a3b6aa391a36f) (cherry picked from commit 88f6dbbe811fc120371596fdf6df0846e30b820c) --- source/utils/net_rpc.c | 38 ++------------------------------------ 1 file changed, 2 insertions(+), 36 deletions(-) diff --git a/source/utils/net_rpc.c b/source/utils/net_rpc.c index 6c8674a07df..be132c2c61f 100644 --- a/source/utils/net_rpc.c +++ b/source/utils/net_rpc.c @@ -2848,39 +2848,6 @@ static int rpc_share_add(struct net_context *c, int argc, const char **argv) /** * Delete a share on a remote RPC server. * - * All parameters are provided by the run_rpc_command function, except for - * argc, argv which are passed through. - * - * @param domain_sid The domain sid acquired from the remote server. - * @param cli A cli_state connected to the server. - * @param mem_ctx Talloc context, destroyed on completion of the function. - * @param argc Standard main() style argc. - * @param argv Standard main() style argv. Initial components are already - * stripped. - * - * @return Normal NTSTATUS return. - **/ -static NTSTATUS rpc_share_del_internals(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) -{ - WERROR result; - - return rpccli_srvsvc_NetShareDel(pipe_hnd, mem_ctx, - pipe_hnd->desthost, - argv[0], - 0, - &result); -} - -/** - * Delete a share on a remote RPC server. - * * @param domain_sid The domain sid acquired from the remote server. * @param argc Standard main() style argc. * @param argv Standard main() style argv. Initial components are already @@ -2893,9 +2860,8 @@ static int rpc_share_delete(struct net_context *c, int argc, const char **argv) if (argc < 1 || c->display_usage) { return rpc_share_usage(c, argc, argv); } - return run_rpc_command(c, NULL, &ndr_table_srvsvc.syntax_id, 0, - rpc_share_del_internals, - argc, argv); + + return NetShareDel(c->opt_host, argv[0], 0); } /** -- 2.11.4.GIT