summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-09-08 10:21:17 +0200
committerGünther Deschner <gd@samba.org>2008-09-11 14:29:36 +0200
commitffdfe3e8b48bd74199f089176782ae3117106b71 (patch)
treec0fe0669be8be6af81a1ee3f78141dbe48dbf510
parent52e87e1fc1aec2670f511199e53e9a0f81409fae (diff)
downloadsamba-ffdfe3e8b48bd74199f089176782ae3117106b71.tar.gz
samba-ffdfe3e8b48bd74199f089176782ae3117106b71.tar.bz2
samba-ffdfe3e8b48bd74199f089176782ae3117106b71.zip
netapi: add skeleton for NetGroupSetUsers.
Guenther (This used to be commit 4d92d000a1676d2da45e8113ade60250c6c7eebe)
-rw-r--r--source3/lib/netapi/group.c18
-rw-r--r--source3/lib/netapi/libnetapi.c48
-rw-r--r--source3/lib/netapi/libnetapi.h9
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] */,