diff options
author | Günther Deschner <gd@samba.org> | 2008-09-09 19:43:02 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-09-11 14:36:55 +0200 |
commit | f2381acf5a69df049dd897d40f9eb7490b33fd00 (patch) | |
tree | 5a0e0d1d0805b09ad16ac602b06eb06fbc1bd1d8 | |
parent | 5986c6730592cc9c007338be8524f74d62467da6 (diff) | |
download | samba-f2381acf5a69df049dd897d40f9eb7490b33fd00.tar.gz samba-f2381acf5a69df049dd897d40f9eb7490b33fd00.tar.xz samba-f2381acf5a69df049dd897d40f9eb7490b33fd00.zip |
netapi: add NetFileGetInfo skeleton.
Guenther
(This used to be commit 6c61c2e35e60a7b1398533311dab5eee38eb3b09)
-rw-r--r-- | source3/lib/netapi/file.c | 18 | ||||
-rw-r--r-- | source3/lib/netapi/libnetapi.c | 46 | ||||
-rw-r--r-- | source3/lib/netapi/libnetapi.h | 8 |
3 files changed, 72 insertions, 0 deletions
diff --git a/source3/lib/netapi/file.c b/source3/lib/netapi/file.c index c0edb8e0628..021e4c29380 100644 --- a/source3/lib/netapi/file.c +++ b/source3/lib/netapi/file.c @@ -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); +} diff --git a/source3/lib/netapi/libnetapi.c b/source3/lib/netapi/libnetapi.c index d83dc28c433..48c019cdf98 100644 --- a/source3/lib/netapi/libnetapi.c +++ b/source3/lib/netapi/libnetapi.c @@ -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; +} + diff --git a/source3/lib/netapi/libnetapi.h b/source3/lib/netapi/libnetapi.h index 86485636657..0d2cd3107e2 100644 --- a/source3/lib/netapi/libnetapi.h +++ b/source3/lib/netapi/libnetapi.h @@ -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__ */ |