netapi: add skeleton for NetShareGetInfo.
authorGünther Deschner <gd@samba.org>
Thu, 4 Sep 2008 13:53:54 +0000 (15:53 +0200)
committerGünther Deschner <gd@samba.org>
Fri, 5 Sep 2008 11:21:12 +0000 (13:21 +0200)
Guenther

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

index 3e42254c7ea8d4c3df2bc43294668719bad03d64..2ad63e37dd5a9d158a3be8b1ecef95f66e8e44ab 100644 (file)
@@ -1964,3 +1964,49 @@ NET_API_STATUS NetShareEnum(const char * server_name /* [in] */,
        return r.out.result;
 }
 
+/****************************************************************
+ NetShareGetInfo
+****************************************************************/
+
+NET_API_STATUS NetShareGetInfo(const char * server_name /* [in] */,
+                              const char * net_name /* [in] */,
+                              uint32_t level /* [in] */,
+                              uint8_t **buffer /* [out] [ref] */)
+{
+       struct NetShareGetInfo 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.level = level;
+
+       /* Out parameters */
+       r.out.buffer = buffer;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(NetShareGetInfo, &r);
+       }
+
+       if (LIBNETAPI_LOCAL_SERVER(server_name)) {
+               werr = NetShareGetInfo_l(ctx, &r);
+       } else {
+               werr = NetShareGetInfo_r(ctx, &r);
+       }
+
+       r.out.result = W_ERROR_V(werr);
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(NetShareGetInfo, &r);
+       }
+
+       return r.out.result;
+}
+
index d2531a287f73ada0ebf24a983bf823743be402f3..9c7aff82d2092124e696e835964c699340280942 100644 (file)
@@ -352,4 +352,12 @@ WERROR NetShareEnum_r(struct libnetapi_ctx *ctx,
                      struct NetShareEnum *r);
 WERROR NetShareEnum_l(struct libnetapi_ctx *ctx,
                      struct NetShareEnum *r);
+NET_API_STATUS NetShareGetInfo(const char * server_name /* [in] */,
+                              const char * net_name /* [in] */,
+                              uint32_t level /* [in] */,
+                              uint8_t **buffer /* [out] [ref] */);
+WERROR NetShareGetInfo_r(struct libnetapi_ctx *ctx,
+                        struct NetShareGetInfo *r);
+WERROR NetShareGetInfo_l(struct libnetapi_ctx *ctx,
+                        struct NetShareGetInfo *r);
 #endif /* __LIBNETAPI_LIBNETAPI__ */
index d31743200fb0bc7b481418e953c10856fb08da0a..20bfd785717eda1597d6b55d906386224697e4e0 100644 (file)
@@ -201,3 +201,21 @@ WERROR NetShareEnum_l(struct libnetapi_ctx *ctx,
 {
        LIBNETAPI_REDIRECT_TO_LOCALHOST(ctx, r, NetShareEnum);
 }
+
+/****************************************************************
+****************************************************************/
+
+WERROR NetShareGetInfo_r(struct libnetapi_ctx *ctx,
+                        struct NetShareGetInfo *r)
+{
+       return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+****************************************************************/
+
+WERROR NetShareGetInfo_l(struct libnetapi_ctx *ctx,
+                        struct NetShareGetInfo *r)
+{
+       LIBNETAPI_REDIRECT_TO_LOCALHOST(ctx, r, NetShareGetInfo);
+}