mirror of
https://github.com/samba-team/samba.git
synced 2025-08-05 12:22:11 +03:00
netapi: add NetFileGetInfo skeleton.
Guenther
(This used to be commit 6c61c2e35e
)
This commit is contained in:
@ -67,3 +67,21 @@ WERROR NetFileClose_l(struct libnetapi_ctx *ctx,
|
||||
{
|
||||
LIBNETAPI_REDIRECT_TO_LOCALHOST(ctx, r, NetFileClose);
|
||||
}
|
||||
|
||||
/****************************************************************
|
||||
****************************************************************/
|
||||
|
||||
WERROR NetFileGetInfo_r(struct libnetapi_ctx *ctx,
|
||||
struct NetFileGetInfo *r)
|
||||
{
|
||||
return WERR_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
/****************************************************************
|
||||
****************************************************************/
|
||||
|
||||
WERROR NetFileGetInfo_l(struct libnetapi_ctx *ctx,
|
||||
struct NetFileGetInfo *r)
|
||||
{
|
||||
LIBNETAPI_REDIRECT_TO_LOCALHOST(ctx, r, NetFileGetInfo);
|
||||
}
|
||||
|
@ -2250,3 +2250,49 @@ NET_API_STATUS NetFileClose(const char * server_name /* [in] */,
|
||||
return r.out.result;
|
||||
}
|
||||
|
||||
/****************************************************************
|
||||
NetFileGetInfo
|
||||
****************************************************************/
|
||||
|
||||
NET_API_STATUS NetFileGetInfo(const char * server_name /* [in] */,
|
||||
uint32_t fileid /* [in] */,
|
||||
uint32_t level /* [in] */,
|
||||
uint8_t **buffer /* [out] [ref] */)
|
||||
{
|
||||
struct NetFileGetInfo 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.fileid = fileid;
|
||||
r.in.level = level;
|
||||
|
||||
/* Out parameters */
|
||||
r.out.buffer = buffer;
|
||||
|
||||
if (DEBUGLEVEL >= 10) {
|
||||
NDR_PRINT_IN_DEBUG(NetFileGetInfo, &r);
|
||||
}
|
||||
|
||||
if (LIBNETAPI_LOCAL_SERVER(server_name)) {
|
||||
werr = NetFileGetInfo_l(ctx, &r);
|
||||
} else {
|
||||
werr = NetFileGetInfo_r(ctx, &r);
|
||||
}
|
||||
|
||||
r.out.result = W_ERROR_V(werr);
|
||||
|
||||
if (DEBUGLEVEL >= 10) {
|
||||
NDR_PRINT_OUT_DEBUG(NetFileGetInfo, &r);
|
||||
}
|
||||
|
||||
return r.out.result;
|
||||
}
|
||||
|
||||
|
@ -405,4 +405,12 @@ WERROR NetFileClose_r(struct libnetapi_ctx *ctx,
|
||||
struct NetFileClose *r);
|
||||
WERROR NetFileClose_l(struct libnetapi_ctx *ctx,
|
||||
struct NetFileClose *r);
|
||||
NET_API_STATUS NetFileGetInfo(const char * server_name /* [in] */,
|
||||
uint32_t fileid /* [in] */,
|
||||
uint32_t level /* [in] */,
|
||||
uint8_t **buffer /* [out] [ref] */);
|
||||
WERROR NetFileGetInfo_r(struct libnetapi_ctx *ctx,
|
||||
struct NetFileGetInfo *r);
|
||||
WERROR NetFileGetInfo_l(struct libnetapi_ctx *ctx,
|
||||
struct NetFileGetInfo *r);
|
||||
#endif /* __LIBNETAPI_LIBNETAPI__ */
|
||||
|
Reference in New Issue
Block a user