netapi: add skeleton for NetLocalGroupEnum().
authorGünther Deschner <gd@samba.org>
Thu, 17 Jul 2008 23:23:26 +0000 (01:23 +0200)
committerGünther Deschner <gd@samba.org>
Fri, 18 Jul 2008 15:25:07 +0000 (17:25 +0200)
Guenther
(This used to be commit 71bd0109d6c393d4361729b514e63fab113bf78a)

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

index 567fab611351e2f62544136f1bd93d4e99629e22..1ebe338f6cdfad603b32bc65ff6c7975c874caa8 100644 (file)
@@ -1282,6 +1282,59 @@ NET_API_STATUS NetLocalGroupSetInfo(const char * server_name /* [in] */,
        return r.out.result;
 }
 
+/****************************************************************
+ 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
 ****************************************************************/
index f104b72f306264fd156f59f0287549f7ad382133..774a0ac2694e56388d88e84d1976f048d2673b09 100644 (file)
@@ -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,
index d91045bab34c3b7ab03f8af0653feb9d7cc91281..1069fde7380e731093014338a63df9ae3e32a25b 100644 (file)
@@ -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;
+}