diff options
author | Günther Deschner <gd@samba.org> | 2008-06-02 13:04:15 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-06-03 01:27:43 +0200 |
commit | 5b111cc4d59db5573e8d488f49ac87a72cc44ae7 (patch) | |
tree | 31b7d6bed16d3edb44e0d8c231aa22e0cbd2a7b4 /source3/lib/netapi | |
parent | e658d64eac6842a605c1d0696618758a3756b501 (diff) | |
download | samba-5b111cc4d59db5573e8d488f49ac87a72cc44ae7.tar.gz samba-5b111cc4d59db5573e8d488f49ac87a72cc44ae7.tar.bz2 samba-5b111cc4d59db5573e8d488f49ac87a72cc44ae7.zip |
netapi: add dummy implementation of NetGroupGetInfo().
Guenther
(This used to be commit 88d03b1645d78334eb6f1fee52838a08539a6aba)
Diffstat (limited to 'source3/lib/netapi')
-rw-r--r-- | source3/lib/netapi/group.c | 18 | ||||
-rw-r--r-- | source3/lib/netapi/libnetapi.c | 46 | ||||
-rw-r--r-- | source3/lib/netapi/libnetapi.h | 8 | ||||
-rw-r--r-- | source3/lib/netapi/netapi.h | 21 |
4 files changed, 93 insertions, 0 deletions
diff --git a/source3/lib/netapi/group.c b/source3/lib/netapi/group.c index e1cd4e6692..8f1b96f74f 100644 --- a/source3/lib/netapi/group.c +++ b/source3/lib/netapi/group.c @@ -735,3 +735,21 @@ WERROR NetGroupSetInfo_l(struct libnetapi_ctx *ctx, { return NetGroupSetInfo_r(ctx, r); } + +/**************************************************************** +****************************************************************/ + +WERROR NetGroupGetInfo_r(struct libnetapi_ctx *ctx, + struct NetGroupGetInfo *r) +{ + return WERR_NOT_SUPPORTED; +} + +/**************************************************************** +****************************************************************/ + +WERROR NetGroupGetInfo_l(struct libnetapi_ctx *ctx, + struct NetGroupGetInfo *r) +{ + return WERR_NOT_SUPPORTED; +} diff --git a/source3/lib/netapi/libnetapi.c b/source3/lib/netapi/libnetapi.c index 0e1d1b30a5..a7e38bd420 100644 --- a/source3/lib/netapi/libnetapi.c +++ b/source3/lib/netapi/libnetapi.c @@ -773,3 +773,49 @@ NET_API_STATUS NetGroupSetInfo(const char * server_name /* [in] */, return r.out.result; } +/**************************************************************** + NetGroupGetInfo +****************************************************************/ + +NET_API_STATUS NetGroupGetInfo(const char * server_name /* [in] */, + const char * group_name /* [in] */, + uint32_t level /* [in] */, + uint8_t **buf /* [out] [ref] */) +{ + struct NetGroupGetInfo 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.group_name = group_name; + r.in.level = level; + + /* Out parameters */ + r.out.buf = buf; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(NetGroupGetInfo, &r); + } + + if (LIBNETAPI_LOCAL_SERVER(server_name)) { + werr = NetGroupGetInfo_l(ctx, &r); + } else { + werr = NetGroupGetInfo_r(ctx, &r); + } + + r.out.result = W_ERROR_V(werr); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(NetGroupGetInfo, &r); + } + + return r.out.result; +} + diff --git a/source3/lib/netapi/libnetapi.h b/source3/lib/netapi/libnetapi.h index 9a7bbd1953..cd9a1b704a 100644 --- a/source3/lib/netapi/libnetapi.h +++ b/source3/lib/netapi/libnetapi.h @@ -134,4 +134,12 @@ WERROR NetGroupSetInfo_r(struct libnetapi_ctx *ctx, struct NetGroupSetInfo *r); WERROR NetGroupSetInfo_l(struct libnetapi_ctx *ctx, struct NetGroupSetInfo *r); +NET_API_STATUS NetGroupGetInfo(const char * server_name /* [in] */, + const char * group_name /* [in] */, + uint32_t level /* [in] */, + uint8_t **buf /* [out] [ref] */); +WERROR NetGroupGetInfo_r(struct libnetapi_ctx *ctx, + struct NetGroupGetInfo *r); +WERROR NetGroupGetInfo_l(struct libnetapi_ctx *ctx, + struct NetGroupGetInfo *r); #endif /* __LIBNETAPI_LIBNETAPI__ */ diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index bd4dc09079..0f9d70ee35 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -558,4 +558,25 @@ NET_API_STATUS NetGroupSetInfo(const char * server_name /* [in] */, uint32_t level /* [in] */, uint8_t *buf /* [in] [ref] */, uint32_t *parm_err /* [out] [ref] */); + +/************************************************************//** + * + * NetGroupGetInfo + * + * @brief Get Domain Group Information + * + * @param[in] server_name The server name to connect to + * @param[in] group_name The name of the group that is going to be modified + * @param[in] level The level defining the requested GROUP_INFO_X structure + * @param[out] buf The buffer containing a GROUP_INFO_X structure + * @return NET_API_STATUS + * + * example group/group_del.c + ***************************************************************/ + +NET_API_STATUS NetGroupGetInfo(const char * server_name /* [in] */, + const char * group_name /* [in] */, + uint32_t level /* [in] */, + uint8_t **buf /* [out] [ref] */); + #endif |