diff options
-rw-r--r-- | source3/lib/netapi/group.c | 18 | ||||
-rw-r--r-- | source3/lib/netapi/libnetapi.c | 48 | ||||
-rw-r--r-- | source3/lib/netapi/libnetapi.h | 9 |
3 files changed, 75 insertions, 0 deletions
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 @@ -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/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] */, |