summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-09-05 16:51:55 +0200
committerGünther Deschner <gd@samba.org>2008-09-11 14:28:46 +0200
commitcbcebf0f08395737b4d8fa8b7d1bcdc4384467d9 (patch)
tree33259691f9175a4f8b15978baf7c99fafdf884e2 /source3/lib
parentf2a987bced1c8e0d4ab2110d0918911c48d0708a (diff)
downloadsamba-cbcebf0f08395737b4d8fa8b7d1bcdc4384467d9.tar.gz
samba-cbcebf0f08395737b4d8fa8b7d1bcdc4384467d9.tar.bz2
samba-cbcebf0f08395737b4d8fa8b7d1bcdc4384467d9.zip
netapi: add skeleton for NetUserSetGroups.
Guenther (This used to be commit 165be948fab1c64526421b44b08de700849bba25)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/netapi/libnetapi.c48
-rw-r--r--source3/lib/netapi/libnetapi.h9
-rw-r--r--source3/lib/netapi/user.c19
3 files changed, 76 insertions, 0 deletions
diff --git a/source3/lib/netapi/libnetapi.c b/source3/lib/netapi/libnetapi.c
index 1f3f2d9bdb..e8c69ae837 100644
--- a/source3/lib/netapi/libnetapi.c
+++ b/source3/lib/netapi/libnetapi.c
@@ -826,6 +826,54 @@ NET_API_STATUS NetUserGetGroups(const char * server_name /* [in] */,
}
/****************************************************************
+ NetUserSetGroups
+****************************************************************/
+
+NET_API_STATUS NetUserSetGroups(const char * server_name /* [in] */,
+ const char * user_name /* [in] */,
+ uint32_t level /* [in] */,
+ uint8_t *buffer /* [in] [ref] */,
+ uint32_t num_entries /* [in] */)
+{
+ struct NetUserSetGroups 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.user_name = user_name;
+ r.in.level = level;
+ r.in.buffer = buffer;
+ r.in.num_entries = num_entries;
+
+ /* Out parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(NetUserSetGroups, &r);
+ }
+
+ if (LIBNETAPI_LOCAL_SERVER(server_name)) {
+ werr = NetUserSetGroups_l(ctx, &r);
+ } else {
+ werr = NetUserSetGroups_r(ctx, &r);
+ }
+
+ r.out.result = W_ERROR_V(werr);
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(NetUserSetGroups, &r);
+ }
+
+ return r.out.result;
+}
+
+/****************************************************************
NetUserModalsGet
****************************************************************/
diff --git a/source3/lib/netapi/libnetapi.h b/source3/lib/netapi/libnetapi.h
index 00ad4de479..eecbf8e4d5 100644
--- a/source3/lib/netapi/libnetapi.h
+++ b/source3/lib/netapi/libnetapi.h
@@ -145,6 +145,15 @@ WERROR NetUserGetGroups_r(struct libnetapi_ctx *ctx,
struct NetUserGetGroups *r);
WERROR NetUserGetGroups_l(struct libnetapi_ctx *ctx,
struct NetUserGetGroups *r);
+NET_API_STATUS NetUserSetGroups(const char * server_name /* [in] */,
+ const char * user_name /* [in] */,
+ uint32_t level /* [in] */,
+ uint8_t *buffer /* [in] [ref] */,
+ uint32_t num_entries /* [in] */);
+WERROR NetUserSetGroups_r(struct libnetapi_ctx *ctx,
+ struct NetUserSetGroups *r);
+WERROR NetUserSetGroups_l(struct libnetapi_ctx *ctx,
+ struct NetUserSetGroups *r);
NET_API_STATUS NetUserModalsGet(const char * server_name /* [in] */,
uint32_t level /* [in] */,
uint8_t **buffer /* [out] [ref] */);
diff --git a/source3/lib/netapi/user.c b/source3/lib/netapi/user.c
index 4fe0aa04ab..bf3397b4eb 100644
--- a/source3/lib/netapi/user.c
+++ b/source3/lib/netapi/user.c
@@ -2923,3 +2923,22 @@ WERROR NetUserGetGroups_l(struct libnetapi_ctx *ctx,
{
LIBNETAPI_REDIRECT_TO_LOCALHOST(ctx, r, NetUserGetGroups);
}
+
+/****************************************************************
+****************************************************************/
+
+
+WERROR NetUserSetGroups_r(struct libnetapi_ctx *ctx,
+ struct NetUserSetGroups *r)
+{
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+****************************************************************/
+
+WERROR NetUserSetGroups_l(struct libnetapi_ctx *ctx,
+ struct NetUserSetGroups *r)
+{
+ LIBNETAPI_REDIRECT_TO_LOCALHOST(ctx, r, NetUserSetGroups);
+}