diff options
author | Günther Deschner <gd@samba.org> | 2008-05-27 12:11:28 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-06-03 01:27:40 +0200 |
commit | ee671b19826ebf57d03ec7f3ee8f653d22d9ce3e (patch) | |
tree | d76d855ce4b1d143a674c1aaf37a1dc5b1be37f9 /source3/lib/netapi/libnetapi.c | |
parent | 2da5df92df46d8399024efd92f856dddafd68f28 (diff) | |
download | samba-ee671b19826ebf57d03ec7f3ee8f653d22d9ce3e.tar.gz samba-ee671b19826ebf57d03ec7f3ee8f653d22d9ce3e.tar.bz2 samba-ee671b19826ebf57d03ec7f3ee8f653d22d9ce3e.zip |
libnetapi: add dummy implementation for NetGroupAdd() and NetGroupDel().
Guenther
(This used to be commit d690f9e9f8b8a0aeda311913589ae48805f7e3b8)
Diffstat (limited to 'source3/lib/netapi/libnetapi.c')
-rw-r--r-- | source3/lib/netapi/libnetapi.c | 90 |
1 files changed, 89 insertions, 1 deletions
diff --git a/source3/lib/netapi/libnetapi.c b/source3/lib/netapi/libnetapi.c index e71adc6893..75087e8b29 100644 --- a/source3/lib/netapi/libnetapi.c +++ b/source3/lib/netapi/libnetapi.c @@ -21,7 +21,7 @@ #include "librpc/gen_ndr/libnetapi.h" #include "lib/netapi/netapi.h" #include "lib/netapi/netapi_private.h" -#include "libnetapi.h" +#include "lib/netapi/libnetapi.h" #include "librpc/gen_ndr/ndr_libnetapi.h" /**************************************************************** @@ -637,3 +637,91 @@ NET_API_STATUS NetQueryDisplayInformation(const char * server_name /* [in] [uniq return r.out.result; } +/**************************************************************** + NetGroupAdd +****************************************************************/ + +NET_API_STATUS NetGroupAdd(const char * server_name /* [in] */, + uint32_t level /* [in] */, + uint8_t *buf /* [in] [ref] */, + uint32_t *parm_err /* [out] [ref] */) +{ + struct NetGroupAdd 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.level = level; + r.in.buf = buf; + + /* Out parameters */ + r.out.parm_err = parm_err; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(NetGroupAdd, &r); + } + + if (LIBNETAPI_LOCAL_SERVER(server_name)) { + werr = NetGroupAdd_l(ctx, &r); + } else { + werr = NetGroupAdd_r(ctx, &r); + } + + r.out.result = W_ERROR_V(werr); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(NetGroupAdd, &r); + } + + return r.out.result; +} + +/**************************************************************** + NetGroupDel +****************************************************************/ + +NET_API_STATUS NetGroupDel(const char * server_name /* [in] */, + const char * group_name /* [in] */) +{ + struct NetGroupDel 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; + + /* Out parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(NetGroupDel, &r); + } + + if (LIBNETAPI_LOCAL_SERVER(server_name)) { + werr = NetGroupDel_l(ctx, &r); + } else { + werr = NetGroupDel_r(ctx, &r); + } + + r.out.result = W_ERROR_V(werr); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(NetGroupDel, &r); + } + + return r.out.result; +} + |