From e60a3cf21c44bcd54e11d4cfcbdef402579dec1f Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnther=20Deschner?= Date: Mon, 8 Sep 2008 10:21:17 +0200 Subject: [PATCH] netapi: add skeleton for NetGroupSetUsers. Guenther (cherry picked from commit 4d92d000a1676d2da45e8113ade60250c6c7eebe) (cherry picked from commit b24c93184a55f197bb640c5beb98e2b0c8cd9752) --- source/lib/netapi/group.c | 18 ++++++++++++++++ source/lib/netapi/libnetapi.c | 48 +++++++++++++++++++++++++++++++++++++++++++ source/lib/netapi/libnetapi.h | 9 ++++++++ 3 files changed, 75 insertions(+) diff --git a/source/lib/netapi/group.c b/source/lib/netapi/group.c index f7c93668208..44c4a74df14 100644 --- a/source/lib/netapi/group.c +++ b/source/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/source/lib/netapi/libnetapi.c b/source/lib/netapi/libnetapi.c index e8c69ae837f..4f3a5bdcb08 100644 --- a/source/lib/netapi/libnetapi.c +++ b/source/lib/netapi/libnetapi.c @@ -1394,6 +1394,54 @@ NET_API_STATUS NetGroupGetUsers(const char * server_name /* [in] */, } /**************************************************************** + 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/source/lib/netapi/libnetapi.h b/source/lib/netapi/libnetapi.h index eecbf8e4d5d..c622116a93d 100644 --- a/source/lib/netapi/libnetapi.h +++ b/source/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] */, -- 2.11.4.GIT