From 45baadb31aee114529b93f959b8a6ecb60b4fab8 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 2 Jun 2008 20:20:27 +0200 Subject: netapi: add NetLocalGroupGetInfo() skeleton. Guenther (This used to be commit f70e37a7fe1915f557e194237a8bb26bcf9635d7) --- source3/lib/netapi/libnetapi.c | 46 +++++++++++++++++++++++++++++++++++++++++ source3/lib/netapi/libnetapi.h | 8 +++++++ source3/lib/netapi/localgroup.c | 20 +++++++++++++++++- 3 files changed, 73 insertions(+), 1 deletion(-) (limited to 'source3/lib') diff --git a/source3/lib/netapi/libnetapi.c b/source3/lib/netapi/libnetapi.c index 522d2aa970..dbe26882d2 100644 --- a/source3/lib/netapi/libnetapi.c +++ b/source3/lib/netapi/libnetapi.c @@ -995,3 +995,49 @@ NET_API_STATUS NetLocalGroupDel(const char * server_name /* [in] */, return r.out.result; } +/**************************************************************** + NetLocalGroupGetInfo +****************************************************************/ + +NET_API_STATUS NetLocalGroupGetInfo(const char * server_name /* [in] */, + const char * group_name /* [in] */, + uint32_t level /* [in] */, + uint8_t **buf /* [out] [ref] */) +{ + struct NetLocalGroupGetInfo 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; + + /* Out parameters */ + r.out.buf = buf; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(NetLocalGroupGetInfo, &r); + } + + if (LIBNETAPI_LOCAL_SERVER(server_name)) { + werr = NetLocalGroupGetInfo_l(ctx, &r); + } else { + werr = NetLocalGroupGetInfo_r(ctx, &r); + } + + r.out.result = W_ERROR_V(werr); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(NetLocalGroupGetInfo, &r); + } + + return r.out.result; +} + diff --git a/source3/lib/netapi/libnetapi.h b/source3/lib/netapi/libnetapi.h index 2386488b72..3ee8cf3634 100644 --- a/source3/lib/netapi/libnetapi.h +++ b/source3/lib/netapi/libnetapi.h @@ -170,4 +170,12 @@ WERROR NetLocalGroupDel_r(struct libnetapi_ctx *ctx, struct NetLocalGroupDel *r); WERROR NetLocalGroupDel_l(struct libnetapi_ctx *ctx, struct NetLocalGroupDel *r); +NET_API_STATUS NetLocalGroupGetInfo(const char * server_name /* [in] */, + const char * group_name /* [in] */, + uint32_t level /* [in] */, + uint8_t **buf /* [out] [ref] */); +WERROR NetLocalGroupGetInfo_r(struct libnetapi_ctx *ctx, + struct NetLocalGroupGetInfo *r); +WERROR NetLocalGroupGetInfo_l(struct libnetapi_ctx *ctx, + struct NetLocalGroupGetInfo *r); #endif /* __LIBNETAPI_LIBNETAPI__ */ diff --git a/source3/lib/netapi/localgroup.c b/source3/lib/netapi/localgroup.c index fd76e09e8e..09b86c8bd9 100644 --- a/source3/lib/netapi/localgroup.c +++ b/source3/lib/netapi/localgroup.c @@ -341,9 +341,27 @@ WERROR NetLocalGroupDel_r(struct libnetapi_ctx *ctx, /**************************************************************** ****************************************************************/ - WERROR NetLocalGroupDel_l(struct libnetapi_ctx *ctx, struct NetLocalGroupDel *r) { return NetLocalGroupDel_r(ctx, r); } + +/**************************************************************** +****************************************************************/ + + +WERROR NetLocalGroupGetInfo_r(struct libnetapi_ctx *ctx, + struct NetLocalGroupGetInfo *r) +{ + return WERR_NOT_SUPPORTED; +} + +/**************************************************************** +****************************************************************/ + +WERROR NetLocalGroupGetInfo_l(struct libnetapi_ctx *ctx, + struct NetLocalGroupGetInfo *r) +{ + return WERR_NOT_SUPPORTED; +} -- cgit