diff options
author | Günther Deschner <gd@samba.org> | 2008-08-29 18:34:28 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-09-05 12:34:28 +0200 |
commit | 6d310cb1d3b550295da386f8fa7a0036fb8e6ef2 (patch) | |
tree | 816e57b16e1e4355ed8648cf08ed1d4197b810c2 /source3/lib/netapi | |
parent | c8be1cd406c4efb9897725699777420f3be21a1d (diff) | |
download | samba-6d310cb1d3b550295da386f8fa7a0036fb8e6ef2.tar.gz samba-6d310cb1d3b550295da386f8fa7a0036fb8e6ef2.tar.bz2 samba-6d310cb1d3b550295da386f8fa7a0036fb8e6ef2.zip |
netapi: add NetShareDel skeleton.
Guenther
(This used to be commit 5b6e4740ea8b8fdfcbd766099a7c5044abbfddde)
Diffstat (limited to 'source3/lib/netapi')
-rw-r--r-- | source3/lib/netapi/libnetapi.c | 44 | ||||
-rw-r--r-- | source3/lib/netapi/libnetapi.h | 7 | ||||
-rw-r--r-- | source3/lib/netapi/share.c | 19 |
3 files changed, 70 insertions, 0 deletions
diff --git a/source3/lib/netapi/libnetapi.c b/source3/lib/netapi/libnetapi.c index b4f2bb6ac2..5ff7db0f7f 100644 --- a/source3/lib/netapi/libnetapi.c +++ b/source3/lib/netapi/libnetapi.c @@ -1819,3 +1819,47 @@ NET_API_STATUS NetShareAdd(const char * server_name /* [in] */, return r.out.result; } +/**************************************************************** + NetShareDel +****************************************************************/ + +NET_API_STATUS NetShareDel(const char * server_name /* [in] */, + const char * net_name /* [in] */, + uint32_t reserved /* [in] */) +{ + struct NetShareDel r; + struct libnetapi_ctx *ctx = NULL; + NET_API_STATUS status; + WERROR werr; + + status = libnetapi_getctx(&ctx); + if (status != 0) { + return status; + } + + /* In parameters */ + r.in.server_name = server_name; + r.in.net_name = net_name; + r.in.reserved = reserved; + + /* Out parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(NetShareDel, &r); + } + + if (LIBNETAPI_LOCAL_SERVER(server_name)) { + werr = NetShareDel_l(ctx, &r); + } else { + werr = NetShareDel_r(ctx, &r); + } + + r.out.result = W_ERROR_V(werr); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(NetShareDel, &r); + } + + return r.out.result; +} + diff --git a/source3/lib/netapi/libnetapi.h b/source3/lib/netapi/libnetapi.h index 9a75b396fe..b20f465f63 100644 --- a/source3/lib/netapi/libnetapi.h +++ b/source3/lib/netapi/libnetapi.h @@ -325,4 +325,11 @@ WERROR NetShareAdd_r(struct libnetapi_ctx *ctx, struct NetShareAdd *r); WERROR NetShareAdd_l(struct libnetapi_ctx *ctx, struct NetShareAdd *r); +NET_API_STATUS NetShareDel(const char * server_name /* [in] */, + const char * net_name /* [in] */, + uint32_t reserved /* [in] */); +WERROR NetShareDel_r(struct libnetapi_ctx *ctx, + struct NetShareDel *r); +WERROR NetShareDel_l(struct libnetapi_ctx *ctx, + struct NetShareDel *r); #endif /* __LIBNETAPI_LIBNETAPI__ */ diff --git a/source3/lib/netapi/share.c b/source3/lib/netapi/share.c index 9983471328..1532b477e5 100644 --- a/source3/lib/netapi/share.c +++ b/source3/lib/netapi/share.c @@ -134,3 +134,22 @@ WERROR NetShareAdd_l(struct libnetapi_ctx *ctx, { LIBNETAPI_REDIRECT_TO_LOCALHOST(ctx, r, NetShareAdd); } + +/**************************************************************** +****************************************************************/ + +WERROR NetShareDel_r(struct libnetapi_ctx *ctx, + struct NetShareDel *r) +{ + return WERR_NOT_SUPPORTED; +} + +/**************************************************************** +****************************************************************/ + +WERROR NetShareDel_l(struct libnetapi_ctx *ctx, + struct NetShareDel *r) +{ + LIBNETAPI_REDIRECT_TO_LOCALHOST(ctx, r, NetShareDel); +} + |