netapi: add skeleton for NetGroupSetUsers.
authorGünther Deschner <gd@samba.org>
Mon, 8 Sep 2008 08:21:17 +0000 (10:21 +0200)
committerGünther Deschner <gd@samba.org>
Thu, 11 Sep 2008 12:29:36 +0000 (14:29 +0200)
Guenther
(This used to be commit 4d92d000a1676d2da45e8113ade60250c6c7eebe)

source3/lib/netapi/group.c
source3/lib/netapi/libnetapi.c
source3/lib/netapi/libnetapi.h

index f7c93668208d5a6591ea5ab22115f65f29f32ee1..44c4a74df14241a89453f8a572cc91b9c0326ea6 100644 (file)
@@ -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);
+}
index e8c69ae837f914343e11389677847fc3cb18da76..4f3a5bdcb08a02f7246e2c61ef1ea1211311cdca 100644 (file)
@@ -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
 ****************************************************************/
index eecbf8e4d5d6d19d02fe2df35fb802c69c3401d2..c622116a93d49ad14c6ad242a35f1151a49ac6cb 100644 (file)
@@ -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] */,