summaryrefslogtreecommitdiff
path: root/source3/lib/netapi
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-09-04 15:53:54 +0200
committerGünther Deschner <gd@samba.org>2008-09-05 13:21:12 +0200
commitfda790bb5d9459d876b6cd4f2944ce434ebb7def (patch)
tree01a100cccf88ececa9ac4da0318db3fdc2258164 /source3/lib/netapi
parent536788efda948ace21369df5316501363ae5d161 (diff)
downloadsamba-fda790bb5d9459d876b6cd4f2944ce434ebb7def.tar.gz
samba-fda790bb5d9459d876b6cd4f2944ce434ebb7def.tar.bz2
samba-fda790bb5d9459d876b6cd4f2944ce434ebb7def.zip
netapi: add skeleton for NetShareGetInfo.
Guenther (This used to be commit 237c6e0bca44e19ca89532e565b1345f9f329111)
Diffstat (limited to 'source3/lib/netapi')
-rw-r--r--source3/lib/netapi/libnetapi.c46
-rw-r--r--source3/lib/netapi/libnetapi.h8
-rw-r--r--source3/lib/netapi/share.c18
3 files changed, 72 insertions, 0 deletions
diff --git a/source3/lib/netapi/libnetapi.c b/source3/lib/netapi/libnetapi.c
index 3e42254c7e..2ad63e37dd 100644
--- a/source3/lib/netapi/libnetapi.c
+++ b/source3/lib/netapi/libnetapi.c
@@ -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;
+}
+
diff --git a/source3/lib/netapi/libnetapi.h b/source3/lib/netapi/libnetapi.h
index d2531a287f..9c7aff82d2 100644
--- a/source3/lib/netapi/libnetapi.h
+++ b/source3/lib/netapi/libnetapi.h
@@ -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__ */
diff --git a/source3/lib/netapi/share.c b/source3/lib/netapi/share.c
index d31743200f..20bfd78571 100644
--- a/source3/lib/netapi/share.c
+++ b/source3/lib/netapi/share.c
@@ -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);
+}