From ffdfe3e8b48bd74199f089176782ae3117106b71 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 8 Sep 2008 10:21:17 +0200 Subject: netapi: add skeleton for NetGroupSetUsers. Guenther (This used to be commit 4d92d000a1676d2da45e8113ade60250c6c7eebe) --- source3/lib/netapi/group.c | 18 ++++++++++++++++ source3/lib/netapi/libnetapi.c | 48 ++++++++++++++++++++++++++++++++++++++++++ source3/lib/netapi/libnetapi.h | 9 ++++++++ 3 files changed, 75 insertions(+) (limited to 'source3') diff --git a/source3/lib/netapi/group.c b/source3/lib/netapi/group.c index f7c9366820..44c4a74df1 100644 --- a/source3/lib/netapi/group.c +++ b/source3/lib/netapi/group.c @@ -1303,3 +1303,21 @@ WERROR NetGroupGetUsers_l(struct libnetapi_ctx *ctx, { LIBNETAPI_REDIRECT_TO_LOCALHOST(ctx, r, NetGroupGetUsers); } + +/**************************************************************** +****************************************************************/ + +WERROR NetGroupSetUsers_r(struct libnetapi_ctx *ctx, + struct NetGroupSetUsers *r) +{ + return WERR_NOT_SUPPORTED; +} + +/**************************************************************** +****************************************************************/ + +WERROR NetGroupSetUsers_l(struct libnetapi_ctx *ctx, + struct NetGroupSetUsers *r) +{ + LIBNETAPI_REDIRECT_TO_LOCALHOST(ctx, r, NetGroupSetUsers); +} diff --git a/source3/lib/netapi/libnetapi.c b/source3/lib/netapi/libnetapi.c index e8c69ae837..4f3a5bdcb0 100644 --- a/source3/lib/netapi/libnetapi.c +++ b/source3/lib/netapi/libnetapi.c @@ -1393,6 +1393,54 @@ NET_API_STATUS NetGroupGetUsers(const char * server_name /* [in] */, return r.out.result; } +/**************************************************************** + NetGroupSetUsers +****************************************************************/ + +NET_API_STATUS NetGroupSetUsers(const char * server_name /* [in] */, + const char * group_name /* [in] */, + uint32_t level /* [in] */, + uint8_t *buffer /* [in] [ref] */, + uint32_t num_entries /* [in] */) +{ + struct NetGroupSetUsers 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.buffer = buffer; + r.in.num_entries = num_entries; + + /* Out parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(NetGroupSetUsers, &r); + } + + if (LIBNETAPI_LOCAL_SERVER(server_name)) { + werr = NetGroupSetUsers_l(ctx, &r); + } else { + werr = NetGroupSetUsers_r(ctx, &r); + } + + r.out.result = W_ERROR_V(werr); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(NetGroupSetUsers, &r); + } + + return r.out.result; +} + /**************************************************************** NetLocalGroupAdd ****************************************************************/ diff --git a/source3/lib/netapi/libnetapi.h b/source3/lib/netapi/libnetapi.h index eecbf8e4d5..c622116a93 100644 --- a/source3/lib/netapi/libnetapi.h +++ b/source3/lib/netapi/libnetapi.h @@ -248,6 +248,15 @@ WERROR NetGroupGetUsers_r(struct libnetapi_ctx *ctx, struct NetGroupGetUsers *r); WERROR NetGroupGetUsers_l(struct libnetapi_ctx *ctx, struct NetGroupGetUsers *r); +NET_API_STATUS NetGroupSetUsers(const char * server_name /* [in] */, + const char * group_name /* [in] */, + uint32_t level /* [in] */, + uint8_t *buffer /* [in] [ref] */, + uint32_t num_entries /* [in] */); +WERROR NetGroupSetUsers_r(struct libnetapi_ctx *ctx, + struct NetGroupSetUsers *r); +WERROR NetGroupSetUsers_l(struct libnetapi_ctx *ctx, + struct NetGroupSetUsers *r); NET_API_STATUS NetLocalGroupAdd(const char * server_name /* [in] */, uint32_t level /* [in] */, uint8_t *buffer /* [in] [ref] */, -- cgit