netapi: add NetShareDel skeleton.
authorGünther Deschner <gd@samba.org>
Fri, 29 Aug 2008 16:34:28 +0000 (18:34 +0200)
committerGünther Deschner <gd@samba.org>
Fri, 5 Sep 2008 10:34:28 +0000 (12:34 +0200)
Guenther
(This used to be commit 5b6e4740ea8b8fdfcbd766099a7c5044abbfddde)

source3/lib/netapi/libnetapi.c
source3/lib/netapi/libnetapi.h
source3/lib/netapi/share.c

index b4f2bb6ac29f2e7ae16bd7d9e6acbe139260b661..5ff7db0f7fbc4feaf8b42d86444ea85a3a22f0b7 100644 (file)
@@ -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;
+}
+
index 9a75b396fe8ddc3d29707aca2825bc5b7cee250d..b20f465f6382c1c7dc92739e4d3373d3a3ae0129 100644 (file)
@@ -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__ */
index 9983471328e531819d742ce1a23c43613b50d7c0..1532b477e5d49298cdbf255fb5b213ce7db718a3 100644 (file)
@@ -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);
+}
+