summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-09-04 15:44:50 +0200
committerGünther Deschner <gd@samba.org>2008-09-05 12:34:58 +0200
commitf9294970b48322f99da121c59881929bde6465fb (patch)
treedf8850f95efd004569b7fdd55d70822ad4f39fcb /source3/utils
parent148dd3b820f754bd7f0394ace19dff983babcf2d (diff)
downloadsamba-f9294970b48322f99da121c59881929bde6465fb.tar.gz
samba-f9294970b48322f99da121c59881929bde6465fb.tar.bz2
samba-f9294970b48322f99da121c59881929bde6465fb.zip
net: use netapi for deleting shares.
Guenther (This used to be commit d7b07b636947cb52aa5474e86c4a3b6aa391a36f)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_rpc.c38
1 files changed, 2 insertions, 36 deletions
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 18abc80ddd..f0a0f448b0 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -2846,39 +2846,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
@@ -2891,9 +2858,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);
}
/**