diff options
-rw-r--r-- | source3/lib/netapi/libnetapi.c | 46 | ||||
-rw-r--r-- | source3/lib/netapi/libnetapi.h | 8 | ||||
-rw-r--r-- | source3/lib/netapi/share.c | 18 |
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); +} |