diff options
author | Günther Deschner <gd@samba.org> | 2008-07-01 20:11:02 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-07-17 10:35:08 +0200 |
commit | c343190344f60cb92c9ad8c5ba71becd5f6329e9 (patch) | |
tree | 67ba3486db1711a69154bdac2d3ae2a9e8d0cb8b /source3/lib/netapi | |
parent | 27897dbebd2afaafda859a4b71b0cd5bdddd9ebf (diff) | |
download | samba-c343190344f60cb92c9ad8c5ba71becd5f6329e9.tar.gz samba-c343190344f60cb92c9ad8c5ba71becd5f6329e9.tar.bz2 samba-c343190344f60cb92c9ad8c5ba71becd5f6329e9.zip |
netapi: add skeleton for NetGroupEnum().
Guenther
(This used to be commit 21a0d9d254d5c21c4bc9fe305e9df2126476f3f4)
Diffstat (limited to 'source3/lib/netapi')
-rw-r--r-- | source3/lib/netapi/group.c | 18 | ||||
-rw-r--r-- | source3/lib/netapi/libnetapi.c | 53 | ||||
-rw-r--r-- | source3/lib/netapi/libnetapi.h | 11 |
3 files changed, 82 insertions, 0 deletions
diff --git a/source3/lib/netapi/group.c b/source3/lib/netapi/group.c index 00e995dc83..5807ad83c1 100644 --- a/source3/lib/netapi/group.c +++ b/source3/lib/netapi/group.c @@ -1013,3 +1013,21 @@ WERROR NetGroupDelUser_l(struct libnetapi_ctx *ctx, { return NetGroupDelUser_r(ctx, r); } + +/**************************************************************** +****************************************************************/ + +WERROR NetGroupEnum_r(struct libnetapi_ctx *ctx, + struct NetGroupEnum *r) +{ + return WERR_NOT_SUPPORTED; +} + +/**************************************************************** +****************************************************************/ + +WERROR NetGroupEnum_l(struct libnetapi_ctx *ctx, + struct NetGroupEnum *r) +{ + return WERR_NOT_SUPPORTED; +} diff --git a/source3/lib/netapi/libnetapi.c b/source3/lib/netapi/libnetapi.c index 659c4c7e5f..0953de6058 100644 --- a/source3/lib/netapi/libnetapi.c +++ b/source3/lib/netapi/libnetapi.c @@ -772,6 +772,59 @@ NET_API_STATUS NetGroupDel(const char * server_name /* [in] */, } /**************************************************************** + NetGroupEnum +****************************************************************/ + +NET_API_STATUS NetGroupEnum(const char * server_name /* [in] */, + uint32_t level /* [in] */, + uint8_t **buffer /* [out] [ref] */, + uint32_t prefmaxlen /* [in] */, + uint32_t *entries_read /* [out] [ref] */, + uint32_t *total_entries /* [out] [ref] */, + uint32_t *resume_handle /* [in,out] [ref] */) +{ + struct NetGroupEnum 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.level = level; + r.in.prefmaxlen = prefmaxlen; + r.in.resume_handle = resume_handle; + + /* Out parameters */ + r.out.buffer = buffer; + r.out.entries_read = entries_read; + r.out.total_entries = total_entries; + r.out.resume_handle = resume_handle; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(NetGroupEnum, &r); + } + + if (LIBNETAPI_LOCAL_SERVER(server_name)) { + werr = NetGroupEnum_l(ctx, &r); + } else { + werr = NetGroupEnum_r(ctx, &r); + } + + r.out.result = W_ERROR_V(werr); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(NetGroupEnum, &r); + } + + return r.out.result; +} + +/**************************************************************** NetGroupSetInfo ****************************************************************/ diff --git a/source3/lib/netapi/libnetapi.h b/source3/lib/netapi/libnetapi.h index 1364a4c08f..a6c8e84b6b 100644 --- a/source3/lib/netapi/libnetapi.h +++ b/source3/lib/netapi/libnetapi.h @@ -133,6 +133,17 @@ WERROR NetGroupDel_r(struct libnetapi_ctx *ctx, struct NetGroupDel *r); WERROR NetGroupDel_l(struct libnetapi_ctx *ctx, struct NetGroupDel *r); +NET_API_STATUS NetGroupEnum(const char * server_name /* [in] */, + uint32_t level /* [in] */, + uint8_t **buffer /* [out] [ref] */, + uint32_t prefmaxlen /* [in] */, + uint32_t *entries_read /* [out] [ref] */, + uint32_t *total_entries /* [out] [ref] */, + uint32_t *resume_handle /* [in,out] [ref] */); +WERROR NetGroupEnum_r(struct libnetapi_ctx *ctx, + struct NetGroupEnum *r); +WERROR NetGroupEnum_l(struct libnetapi_ctx *ctx, + struct NetGroupEnum *r); NET_API_STATUS NetGroupSetInfo(const char * server_name /* [in] */, const char * group_name /* [in] */, uint32_t level /* [in] */, |