summaryrefslogtreecommitdiff
path: root/source3/lib/netapi
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-08-29 18:49:35 +0200
committerGünther Deschner <gd@samba.org>2008-09-05 12:34:50 +0200
commit148dd3b820f754bd7f0394ace19dff983babcf2d (patch)
treef3b2bb31fbe69773fad69be9c04affaaece58a1c /source3/lib/netapi
parent37704001bb36de3f2715d73cd2ddfaf27e4ee04e (diff)
downloadsamba-148dd3b820f754bd7f0394ace19dff983babcf2d.tar.gz
samba-148dd3b820f754bd7f0394ace19dff983babcf2d.tar.bz2
samba-148dd3b820f754bd7f0394ace19dff983babcf2d.zip
netapi: implement NetShareDel_r.
Guenther (This used to be commit 47bed6f112dbcc509ce6ac593c9920d98b658f9a)
Diffstat (limited to 'source3/lib/netapi')
-rw-r--r--source3/lib/netapi/share.c33
1 files changed, 32 insertions, 1 deletions
diff --git a/source3/lib/netapi/share.c b/source3/lib/netapi/share.c
index 1532b477e5..2c796046df 100644
--- a/source3/lib/netapi/share.c
+++ b/source3/lib/netapi/share.c
@@ -141,7 +141,38 @@ WERROR NetShareAdd_l(struct libnetapi_ctx *ctx,
WERROR NetShareDel_r(struct libnetapi_ctx *ctx,
struct NetShareDel *r)
{
- return WERR_NOT_SUPPORTED;
+ WERROR werr;
+ NTSTATUS status;
+ struct cli_state *cli = NULL;
+ struct rpc_pipe_client *pipe_cli = NULL;
+
+ if (!r->in.net_name) {
+ return WERR_INVALID_PARAM;
+ }
+
+ werr = libnetapi_open_pipe(ctx, r->in.server_name,
+ &ndr_table_srvsvc.syntax_id,
+ &cli,
+ &pipe_cli);
+ if (!W_ERROR_IS_OK(werr)) {
+ goto done;
+ }
+
+ status = rpccli_srvsvc_NetShareDel(pipe_cli, ctx,
+ r->in.server_name,
+ r->in.net_name,
+ r->in.reserved,
+ &werr);
+ if (!W_ERROR_IS_OK(werr)) {
+ goto done;
+ }
+
+ done:
+ if (!cli) {
+ return werr;
+ }
+
+ return werr;
}
/****************************************************************