netapi: add NetLocalGroupAdd() skeleton.
authorGünther Deschner <gd@samba.org>
Mon, 2 Jun 2008 15:34:53 +0000 (17:34 +0200)
committerGünther Deschner <gd@samba.org>
Mon, 2 Jun 2008 23:27:46 +0000 (01:27 +0200)
Guenther

source/Makefile.in
source/lib/netapi/libnetapi.c
source/lib/netapi/libnetapi.h
source/lib/netapi/localgroup.c [new file with mode: 0644]

index c289b01467299c7c21ce2da1f7395a54d3659e3a..9f05165dfad68162054004b2aa28e3577cbd5533 100644 (file)
@@ -866,6 +866,7 @@ LIBNETAPI_OBJ1 = lib/netapi/netapi.o \
                 lib/netapi/getdc.o \
                 lib/netapi/user.o \
                 lib/netapi/group.o \
+                lib/netapi/localgroup.o \
                 lib/netapi/samr.o
 
 LIBNETAPI_OBJ  = $(LIBNETAPI_OBJ1) $(LIBNET_OBJ) \
index 3bbb1686abc0a5c67e3aaf7f867bc5f8080837bb..6537329fe054217c17aa4b536f7678000206358c 100644 (file)
@@ -907,3 +907,49 @@ NET_API_STATUS NetGroupDelUser(const char * server_name /* [in] */,
        return r.out.result;
 }
 
+/****************************************************************
+ NetLocalGroupAdd
+****************************************************************/
+
+NET_API_STATUS NetLocalGroupAdd(const char * server_name /* [in] */,
+                               uint32_t level /* [in] */,
+                               uint8_t *buf /* [in] [ref] */,
+                               uint32_t *parm_err /* [out] [ref] */)
+{
+       struct NetLocalGroupAdd 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(NetLocalGroupAdd, &r);
+       }
+
+       if (LIBNETAPI_LOCAL_SERVER(server_name)) {
+               werr = NetLocalGroupAdd_l(ctx, &r);
+       } else {
+               werr = NetLocalGroupAdd_r(ctx, &r);
+       }
+
+       r.out.result = W_ERROR_V(werr);
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(NetLocalGroupAdd, &r);
+       }
+
+       return r.out.result;
+}
+
index 4faca46b227d0c46c75c0ee31df662b3fb4dade4..38826996fa541d91421e6d8a5e772ba961916332 100644 (file)
@@ -156,4 +156,12 @@ WERROR NetGroupDelUser_r(struct libnetapi_ctx *ctx,
                         struct NetGroupDelUser *r);
 WERROR NetGroupDelUser_l(struct libnetapi_ctx *ctx,
                         struct NetGroupDelUser *r);
+NET_API_STATUS NetLocalGroupAdd(const char * server_name /* [in] */,
+                               uint32_t level /* [in] */,
+                               uint8_t *buf /* [in] [ref] */,
+                               uint32_t *parm_err /* [out] [ref] */);
+WERROR NetLocalGroupAdd_r(struct libnetapi_ctx *ctx,
+                         struct NetLocalGroupAdd *r);
+WERROR NetLocalGroupAdd_l(struct libnetapi_ctx *ctx,
+                         struct NetLocalGroupAdd *r);
 #endif /* __LIBNETAPI_LIBNETAPI__ */
diff --git a/source/lib/netapi/localgroup.c b/source/lib/netapi/localgroup.c
new file mode 100644 (file)
index 0000000..4a1b760
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ *  Unix SMB/CIFS implementation.
+ *  NetApi LocalGroup Support
+ *  Copyright (C) Guenther Deschner 2008
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "includes.h"
+
+#include "librpc/gen_ndr/libnetapi.h"
+#include "lib/netapi/netapi.h"
+#include "lib/netapi/netapi_private.h"
+#include "lib/netapi/libnetapi.h"
+
+/****************************************************************
+****************************************************************/
+
+WERROR NetLocalGroupAdd_r(struct libnetapi_ctx *ctx,
+                         struct NetLocalGroupAdd *r)
+{
+       return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+****************************************************************/
+
+WERROR NetLocalGroupAdd_l(struct libnetapi_ctx *ctx,
+                         struct NetLocalGroupAdd *r)
+{
+       return WERR_NOT_SUPPORTED;
+}