diff options
author | Günther Deschner <gd@samba.org> | 2008-07-18 23:40:33 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-07-30 16:55:05 +0200 |
commit | cf2ac8f8db3b62afb2c9a6ff56de5d9691af5a0f (patch) | |
tree | b1eaddbb7e46098c97fcc26f9d78d3df61a93d9e /source3 | |
parent | c24ed2b65331a27b43783e7ca30cedfbc516a867 (diff) | |
download | samba-cf2ac8f8db3b62afb2c9a6ff56de5d9691af5a0f.tar.gz samba-cf2ac8f8db3b62afb2c9a6ff56de5d9691af5a0f.tar.bz2 samba-cf2ac8f8db3b62afb2c9a6ff56de5d9691af5a0f.zip |
netapi: add NetGroupGetUsers skeleton.
GUenther
(This used to be commit 0b4e2687ae8fb48faacceb4078d61f9fd2acea9d)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/netapi/group.c | 18 | ||||
-rw-r--r-- | source3/lib/netapi/libnetapi.c | 55 | ||||
-rw-r--r-- | source3/lib/netapi/libnetapi.h | 12 |
3 files changed, 85 insertions, 0 deletions
diff --git a/source3/lib/netapi/group.c b/source3/lib/netapi/group.c index c1c55c8a31..30ff6af2f0 100644 --- a/source3/lib/netapi/group.c +++ b/source3/lib/netapi/group.c @@ -1306,3 +1306,21 @@ WERROR NetGroupEnum_l(struct libnetapi_ctx *ctx, { return NetGroupEnum_r(ctx, r); } + +/**************************************************************** +****************************************************************/ + +WERROR NetGroupGetUsers_r(struct libnetapi_ctx *ctx, + struct NetGroupGetUsers *r) +{ + return WERR_NOT_SUPPORTED; +} + +/**************************************************************** +****************************************************************/ + +WERROR NetGroupGetUsers_l(struct libnetapi_ctx *ctx, + struct NetGroupGetUsers *r) +{ + return WERR_NOT_SUPPORTED; +} diff --git a/source3/lib/netapi/libnetapi.c b/source3/lib/netapi/libnetapi.c index 7e9e094df4..fe57238303 100644 --- a/source3/lib/netapi/libnetapi.c +++ b/source3/lib/netapi/libnetapi.c @@ -1101,6 +1101,61 @@ NET_API_STATUS NetGroupDelUser(const char * server_name /* [in] */, } /**************************************************************** + NetGroupGetUsers +****************************************************************/ + +NET_API_STATUS NetGroupGetUsers(const char * server_name /* [in] */, + const char * group_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 NetGroupGetUsers 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; + 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(NetGroupGetUsers, &r); + } + + if (LIBNETAPI_LOCAL_SERVER(server_name)) { + werr = NetGroupGetUsers_l(ctx, &r); + } else { + werr = NetGroupGetUsers_r(ctx, &r); + } + + r.out.result = W_ERROR_V(werr); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(NetGroupGetUsers, &r); + } + + return r.out.result; +} + +/**************************************************************** NetLocalGroupAdd ****************************************************************/ diff --git a/source3/lib/netapi/libnetapi.h b/source3/lib/netapi/libnetapi.h index 001040096d..5c9e2e2cef 100644 --- a/source3/lib/netapi/libnetapi.h +++ b/source3/lib/netapi/libnetapi.h @@ -192,6 +192,18 @@ WERROR NetGroupDelUser_r(struct libnetapi_ctx *ctx, struct NetGroupDelUser *r); WERROR NetGroupDelUser_l(struct libnetapi_ctx *ctx, struct NetGroupDelUser *r); +NET_API_STATUS NetGroupGetUsers(const char * server_name /* [in] */, + const char * group_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 NetGroupGetUsers_r(struct libnetapi_ctx *ctx, + struct NetGroupGetUsers *r); +WERROR NetGroupGetUsers_l(struct libnetapi_ctx *ctx, + struct NetGroupGetUsers *r); NET_API_STATUS NetLocalGroupAdd(const char * server_name /* [in] */, uint32_t level /* [in] */, uint8_t *buffer /* [in] [ref] */, |