summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-07-18 01:23:26 +0200
committerGünther Deschner <gd@samba.org>2008-07-18 17:25:07 +0200
commitd86068977c3aaa8ac127156fbee1f62e535b59d7 (patch)
tree8749722d10d61a354b342d42da26a986559d876b
parentf15740f4244bd5eb52641133922c68c043b349c9 (diff)
downloadsamba-d86068977c3aaa8ac127156fbee1f62e535b59d7.tar.gz
samba-d86068977c3aaa8ac127156fbee1f62e535b59d7.tar.bz2
samba-d86068977c3aaa8ac127156fbee1f62e535b59d7.zip
netapi: add skeleton for NetLocalGroupEnum().
Guenther (This used to be commit 71bd0109d6c393d4361729b514e63fab113bf78a)
-rw-r--r--source3/lib/netapi/libnetapi.c53
-rw-r--r--source3/lib/netapi/libnetapi.h11
-rw-r--r--source3/lib/netapi/localgroup.c18
3 files changed, 82 insertions, 0 deletions
diff --git a/source3/lib/netapi/libnetapi.c b/source3/lib/netapi/libnetapi.c
index 567fab6113..1ebe338f6c 100644
--- a/source3/lib/netapi/libnetapi.c
+++ b/source3/lib/netapi/libnetapi.c
@@ -1283,6 +1283,59 @@ NET_API_STATUS NetLocalGroupSetInfo(const char * server_name /* [in] */,
}
/****************************************************************
+ NetLocalGroupEnum
+****************************************************************/
+
+NET_API_STATUS NetLocalGroupEnum(const char * server_name /* [in] */,
+ uint32_t level /* [in] */,
+ uint8_t **buffer /* [out] [ref] */,
+ uint32_t prefmaxlen /* [in] */,
+ uint32_t *entries_read /* [out] [ref] */,
+ uint32_t *total_entries /* [out] [ref] */,
+ uint32_t *resume_handle /* [in,out] [ref] */)
+{
+ struct NetLocalGroupEnum 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.prefmaxlen = prefmaxlen;
+ r.in.resume_handle = resume_handle;
+
+ /* Out parameters */
+ r.out.buffer = buffer;
+ r.out.entries_read = entries_read;
+ r.out.total_entries = total_entries;
+ r.out.resume_handle = resume_handle;
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(NetLocalGroupEnum, &r);
+ }
+
+ if (LIBNETAPI_LOCAL_SERVER(server_name)) {
+ werr = NetLocalGroupEnum_l(ctx, &r);
+ } else {
+ werr = NetLocalGroupEnum_r(ctx, &r);
+ }
+
+ r.out.result = W_ERROR_V(werr);
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(NetLocalGroupEnum, &r);
+ }
+
+ return r.out.result;
+}
+
+/****************************************************************
NetRemoteTOD
****************************************************************/
diff --git a/source3/lib/netapi/libnetapi.h b/source3/lib/netapi/libnetapi.h
index f104b72f30..774a0ac269 100644
--- a/source3/lib/netapi/libnetapi.h
+++ b/source3/lib/netapi/libnetapi.h
@@ -223,6 +223,17 @@ WERROR NetLocalGroupSetInfo_r(struct libnetapi_ctx *ctx,
struct NetLocalGroupSetInfo *r);
WERROR NetLocalGroupSetInfo_l(struct libnetapi_ctx *ctx,
struct NetLocalGroupSetInfo *r);
+NET_API_STATUS NetLocalGroupEnum(const char * server_name /* [in] */,
+ uint32_t level /* [in] */,
+ uint8_t **buffer /* [out] [ref] */,
+ uint32_t prefmaxlen /* [in] */,
+ uint32_t *entries_read /* [out] [ref] */,
+ uint32_t *total_entries /* [out] [ref] */,
+ uint32_t *resume_handle /* [in,out] [ref] */);
+WERROR NetLocalGroupEnum_r(struct libnetapi_ctx *ctx,
+ struct NetLocalGroupEnum *r);
+WERROR NetLocalGroupEnum_l(struct libnetapi_ctx *ctx,
+ struct NetLocalGroupEnum *r);
NET_API_STATUS NetRemoteTOD(const char * server_name /* [in] */,
uint8_t **buf /* [out] [ref] */);
WERROR NetRemoteTOD_r(struct libnetapi_ctx *ctx,
diff --git a/source3/lib/netapi/localgroup.c b/source3/lib/netapi/localgroup.c
index d91045bab3..1069fde738 100644
--- a/source3/lib/netapi/localgroup.c
+++ b/source3/lib/netapi/localgroup.c
@@ -752,3 +752,21 @@ WERROR NetLocalGroupSetInfo_l(struct libnetapi_ctx *ctx,
{
return NetLocalGroupSetInfo_r(ctx, r);
}
+
+/****************************************************************
+****************************************************************/
+
+WERROR NetLocalGroupEnum_r(struct libnetapi_ctx *ctx,
+ struct NetLocalGroupEnum *r)
+{
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+****************************************************************/
+
+WERROR NetLocalGroupEnum_l(struct libnetapi_ctx *ctx,
+ struct NetLocalGroupEnum *r)
+{
+ return WERR_NOT_SUPPORTED;
+}