mirror of
https://github.com/samba-team/samba.git
synced 2025-08-04 08:22:08 +03:00
netapi: add skeleton for NetShareGetInfo.
Guenther
(This used to be commit 237c6e0bca
)
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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__ */
|
||||
|
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user