[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-3591-g4fea49a

Günther Deschner gd at samba.org
Mon Aug 11 17:50:45 GMT 2008


The branch, v3-3-test has been updated
       via  4fea49ae83510225c51c580a2bea2c664851bb39 (commit)
       via  b2a413148e470e059c877f4e54955ab61559edee (commit)
       via  01c4640b1ca66c3285fd23d447d08db12cf83b42 (commit)
       via  bb52ba58e47364d7c7ed38862a007e8e3d9dc104 (commit)
       via  bd31d8f9ec9a24ca68e1d5441c0cafd98132060f (commit)
       via  53dc9a11810b93a1771304fbfbf4ae84f551612b (commit)
       via  d4a51bb01d33ad17db4e623085a89d258e91b57e (commit)
       via  563fb06107d2d3279e08c5c801a940f03229131b (commit)
       via  b6b24094daf170f457bc414d8e17e43effab6e1b (commit)
       via  c06dfb823548de3652778c67918335578f194678 (commit)
      from  a9c444a342968b539918c082b78af8640f8c87cd (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-test


- Log -----------------------------------------------------------------
commit 4fea49ae83510225c51c580a2bea2c664851bb39
Author: Günther Deschner <gd at samba.org>
Date:   Fri Aug 1 19:15:52 2008 +0200

    netapi: add NetLocalGroupSetMembers example code.
    
    Guenther

commit b2a413148e470e059c877f4e54955ab61559edee
Author: Günther Deschner <gd at samba.org>
Date:   Fri Aug 1 17:13:43 2008 +0200

    netapi: add NetLocalGroupDelMembers example code.
    
    Guenther

commit 01c4640b1ca66c3285fd23d447d08db12cf83b42
Author: Günther Deschner <gd at samba.org>
Date:   Fri Aug 1 16:03:00 2008 +0200

    netapi: add NetLocalGroupAddMembers example code.
    
    Guenther

commit bb52ba58e47364d7c7ed38862a007e8e3d9dc104
Author: Günther Deschner <gd at samba.org>
Date:   Mon Aug 11 19:43:24 2008 +0200

    netapi: implement NetLocalGroupSetMembers_r().
    
    Guenther

commit bd31d8f9ec9a24ca68e1d5441c0cafd98132060f
Author: Günther Deschner <gd at samba.org>
Date:   Mon Aug 11 19:42:42 2008 +0200

    netapi: implement NetLocalGroupDelMembers_r().
    
    Guenther

commit 53dc9a11810b93a1771304fbfbf4ae84f551612b
Author: Günther Deschner <gd at samba.org>
Date:   Fri Aug 1 16:02:21 2008 +0200

    netapi: implement NetLocalGroupAddMembers_r().
    
    Guenther

commit d4a51bb01d33ad17db4e623085a89d258e91b57e
Author: Günther Deschner <gd at samba.org>
Date:   Thu Jul 31 16:24:58 2008 +0200

    netapi: add NetLocalGroup*Member calls to public headers.
    
    Guenther

commit 563fb06107d2d3279e08c5c801a940f03229131b
Author: Günther Deschner <gd at samba.org>
Date:   Thu Jul 31 16:05:11 2008 +0200

    netapi: add skeleton for NetLocalGroup*Member calls.
    
    Guenther

commit b6b24094daf170f457bc414d8e17e43effab6e1b
Author: Günther Deschner <gd at samba.org>
Date:   Mon Aug 11 19:08:46 2008 +0200

    re-run make idl.
    
    Guenther

commit c06dfb823548de3652778c67918335578f194678
Author: Günther Deschner <gd at samba.org>
Date:   Thu Jul 31 16:03:57 2008 +0200

    netapi: add remaining NetLocalGroup*Member calls to IDL.
    
    Guenther

-----------------------------------------------------------------------

Summary of changes:
 source/lib/netapi/examples/Makefile.in             |   18 +
 .../localgroup_addmembers.c}                       |  101 +++---
 .../localgroup_delmembers.c}                       |  101 +++---
 .../localgroup_setmembers.c}                       |  101 +++---
 source/lib/netapi/libnetapi.c                      |  199 +++++++++
 source/lib/netapi/libnetapi.h                      |   39 ++
 source/lib/netapi/localgroup.c                     |  424 ++++++++++++++++++++
 source/lib/netapi/netapi.h                         |   57 +++
 source/librpc/gen_ndr/libnetapi.h                  |  117 ++++++
 source/librpc/gen_ndr/ndr_libnetapi.c              |  137 +++++++
 source/librpc/gen_ndr/ndr_libnetapi.h              |   24 +-
 source/librpc/idl/libnetapi.idl                    |   84 ++++
 12 files changed, 1247 insertions(+), 155 deletions(-)
 copy source/lib/netapi/examples/{group/group_setinfo.c => localgroup/localgroup_addmembers.c} (55%)
 copy source/lib/netapi/examples/{group/group_setinfo.c => localgroup/localgroup_delmembers.c} (55%)
 copy source/lib/netapi/examples/{group/group_setinfo.c => localgroup/localgroup_setmembers.c} (55%)


Changeset truncated at 500 lines:

diff --git a/source/lib/netapi/examples/Makefile.in b/source/lib/netapi/examples/Makefile.in
index 5e577ed..158df4f 100644
--- a/source/lib/netapi/examples/Makefile.in
+++ b/source/lib/netapi/examples/Makefile.in
@@ -44,6 +44,9 @@ PROGS = bin/getdc at EXEEXT@ \
 	bin/localgroup_getinfo at EXEEXT@ \
 	bin/localgroup_setinfo at EXEEXT@ \
 	bin/localgroup_enum at EXEEXT@ \
+	bin/localgroup_addmembers at EXEEXT@ \
+	bin/localgroup_delmembers at EXEEXT@ \
+	bin/localgroup_setmembers at EXEEXT@ \
 	bin/remote_tod at EXEEXT@
 
 all: $(PROGS)
@@ -100,6 +103,9 @@ LOCALGROUPDEL_OBJ = localgroup/localgroup_del.o $(CMDLINE_OBJ)
 LOCALGROUPGETINFO_OBJ = localgroup/localgroup_getinfo.o $(CMDLINE_OBJ)
 LOCALGROUPSETINFO_OBJ = localgroup/localgroup_setinfo.o $(CMDLINE_OBJ)
 LOCALGROUPENUM_OBJ = localgroup/localgroup_enum.o $(CMDLINE_OBJ)
+LOCALGROUPADDMEMBERS_OBJ = localgroup/localgroup_addmembers.o $(CMDLINE_OBJ)
+LOCALGROUPDELMEMBERS_OBJ = localgroup/localgroup_delmembers.o $(CMDLINE_OBJ)
+LOCALGROUPSETMEMBERS_OBJ = localgroup/localgroup_setmembers.o $(CMDLINE_OBJ)
 REMOTETOD_OBJ = server/remote_tod.o $(CMDLINE_OBJ)
 
 bin/getdc at EXEEXT@: $(BINARY_PREREQS) $(GETDC_OBJ)
@@ -210,6 +216,18 @@ bin/localgroup_enum at EXEEXT@: $(BINARY_PREREQS) $(LOCALGROUPENUM_OBJ)
 	@echo Linking $@
 	@$(CC) $(FLAGS) -o $@ $(LOCALGROUPENUM_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS)
 
+bin/localgroup_addmembers at EXEEXT@: $(BINARY_PREREQS) $(LOCALGROUPADDMEMBERS_OBJ)
+	@echo Linking $@
+	@$(CC) $(FLAGS) -o $@ $(LOCALGROUPADDMEMBERS_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS)
+
+bin/localgroup_delmembers at EXEEXT@: $(BINARY_PREREQS) $(LOCALGROUPDELMEMBERS_OBJ)
+	@echo Linking $@
+	@$(CC) $(FLAGS) -o $@ $(LOCALGROUPDELMEMBERS_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS)
+
+bin/localgroup_setmembers at EXEEXT@: $(BINARY_PREREQS) $(LOCALGROUPSETMEMBERS_OBJ)
+	@echo Linking $@
+	@$(CC) $(FLAGS) -o $@ $(LOCALGROUPSETMEMBERS_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS)
+
 bin/remote_tod at EXEEXT@: $(BINARY_PREREQS) $(REMOTETOD_OBJ)
 	@echo Linking $@
 	@$(CC) $(FLAGS) -o $@ $(REMOTETOD_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS)
diff --git a/source/lib/netapi/examples/group/group_setinfo.c b/source/lib/netapi/examples/localgroup/localgroup_addmembers.c
similarity index 55%
copy from source/lib/netapi/examples/group/group_setinfo.c
copy to source/lib/netapi/examples/localgroup/localgroup_addmembers.c
index cd30d8b..aa4a9b5 100644
--- a/source/lib/netapi/examples/group/group_setinfo.c
+++ b/source/lib/netapi/examples/localgroup/localgroup_addmembers.c
@@ -1,6 +1,6 @@
 /*
  *  Unix SMB/CIFS implementation.
- *  NetGroupSetInfo query
+ *  NetLocalGroupAddMembers query
  *  Copyright (C) Guenther Deschner 2008
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -33,16 +33,13 @@ int main(int argc, const char **argv)
 	struct libnetapi_ctx *ctx = NULL;
 	const char *hostname = NULL;
 	const char *groupname = NULL;
-	const char *option = NULL;
+	struct LOCALGROUP_MEMBERS_INFO_0 *g0;
+	struct LOCALGROUP_MEMBERS_INFO_3 *g3;
+	uint32_t total_entries = 0;
 	uint8_t *buffer = NULL;
-	uint32_t level = 0;
-	uint32_t parm_err = 0;
-	struct GROUP_INFO_0 g0;
-	struct GROUP_INFO_1 g1;
-	struct GROUP_INFO_2 g2;
-	struct GROUP_INFO_3 g3;
-	struct GROUP_INFO_1002 g1002;
-	struct GROUP_INFO_1005 g1005;
+	uint32_t level = 3;
+	const char **names = NULL;
+	int i = 0;
 
 	poptContext pc;
 	int opt;
@@ -58,9 +55,9 @@ int main(int argc, const char **argv)
 		return status;
 	}
 
-	pc = poptGetContext("group_setinfo", argc, argv, long_options, 0);
+	pc = poptGetContext("localgroup_addmembers", argc, argv, long_options, 0);
 
-	poptSetOtherOptionHelp(pc, "hostname groupname level option");
+	poptSetOtherOptionHelp(pc, "hostname groupname member1 member2 ...");
 	while((opt = poptGetNextOpt(pc)) != -1) {
 	}
 
@@ -80,58 +77,60 @@ int main(int argc, const char **argv)
 		poptPrintHelp(pc, stderr, 0);
 		goto out;
 	}
-	level = atoi(poptGetArg(pc));
 
-	if (!poptPeekArg(pc)) {
-		poptPrintHelp(pc, stderr, 0);
-		goto out;
+	names = poptGetArgs(pc);
+	for (i=0; names[i] != NULL; i++) {
+		total_entries++;
 	}
-	option = poptGetArg(pc);
-
-	/* NetGroupSetInfo */
 
 	switch (level) {
 		case 0:
-			g0.grpi0_name = option;
-			buffer = (uint8_t *)&g0;
-			break;
-		case 1:
-			g1.grpi1_name = option; /* this one will be ignored */
-			g1.grpi1_comment = option;
-			buffer = (uint8_t *)&g1;
-			break;
-		case 2:
-			g2.grpi2_name = option; /* this one will be ignored */
-			g2.grpi2_comment = option;
-			g2.grpi2_group_id = 4711; /* this one will be ignored */
-			g2.grpi2_attributes = 7;
-			buffer = (uint8_t *)&g2;
+			status = NetApiBufferAllocate(sizeof(struct LOCALGROUP_MEMBERS_INFO_0) * total_entries,
+						      (void **)&g0);
+			if (status) {
+				printf("NetApiBufferAllocate failed with: %s\n",
+					libnetapi_get_error_string(ctx, status));
+				goto out;
+			}
+
+			for (i=0; i<total_entries; i++) {
+				if (!ConvertStringSidToSid(names[i], &g0[i].lgrmi0_sid)) {
+					printf("could not convert sid\n");
+					goto out;
+				}
+			}
+
+			buffer = (uint8_t *)g0;
 			break;
 		case 3:
-			g3.grpi3_name = option; /* this one will be ignored */
-			g3.grpi3_comment = option;
-			g2.grpi2_attributes = 7;
-			buffer = (uint8_t *)&g3;
-			break;
-		case 1002:
-			g1002.grpi1002_comment = option;
-			buffer = (uint8_t *)&g1002;
+			status = NetApiBufferAllocate(sizeof(struct LOCALGROUP_MEMBERS_INFO_3) * total_entries,
+						      (void **)&g3);
+			if (status) {
+				printf("NetApiBufferAllocate failed with: %s\n",
+					libnetapi_get_error_string(ctx, status));
+				goto out;
+			}
+
+			for (i=0; i<total_entries; i++) {
+				g3[i].lgrmi3_domainandname = names[i];
+			}
+
+			buffer = (uint8_t *)g3;
 			break;
-		case 1005:
-			g1005.grpi1005_attributes = atoi(option);
-			buffer = (uint8_t *)&g1005;
+		default:
 			break;
 	}
 
-	status = NetGroupSetInfo(hostname,
-				 groupname,
-				 level,
-				 buffer,
-				 &parm_err);
+	/* NetLocalGroupAddMembers */
+
+	status = NetLocalGroupAddMembers(hostname,
+					 groupname,
+					 level,
+					 buffer,
+					 total_entries);
 	if (status != 0) {
-		printf("NetGroupSetInfo failed with: %s\n",
+		printf("NetLocalGroupAddMembers failed with: %s\n",
 			libnetapi_get_error_string(ctx, status));
-		goto out;
 	}
 
  out:
diff --git a/source/lib/netapi/examples/group/group_setinfo.c b/source/lib/netapi/examples/localgroup/localgroup_delmembers.c
similarity index 55%
copy from source/lib/netapi/examples/group/group_setinfo.c
copy to source/lib/netapi/examples/localgroup/localgroup_delmembers.c
index cd30d8b..7bd3ec0 100644
--- a/source/lib/netapi/examples/group/group_setinfo.c
+++ b/source/lib/netapi/examples/localgroup/localgroup_delmembers.c
@@ -1,6 +1,6 @@
 /*
  *  Unix SMB/CIFS implementation.
- *  NetGroupSetInfo query
+ *  NetLocalGroupDelMembers query
  *  Copyright (C) Guenther Deschner 2008
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -33,16 +33,13 @@ int main(int argc, const char **argv)
 	struct libnetapi_ctx *ctx = NULL;
 	const char *hostname = NULL;
 	const char *groupname = NULL;
-	const char *option = NULL;
+	struct LOCALGROUP_MEMBERS_INFO_0 *g0;
+	struct LOCALGROUP_MEMBERS_INFO_3 *g3;
+	uint32_t total_entries = 0;
 	uint8_t *buffer = NULL;
-	uint32_t level = 0;
-	uint32_t parm_err = 0;
-	struct GROUP_INFO_0 g0;
-	struct GROUP_INFO_1 g1;
-	struct GROUP_INFO_2 g2;
-	struct GROUP_INFO_3 g3;
-	struct GROUP_INFO_1002 g1002;
-	struct GROUP_INFO_1005 g1005;
+	uint32_t level = 3;
+	const char **names = NULL;
+	int i = 0;
 
 	poptContext pc;
 	int opt;
@@ -58,9 +55,9 @@ int main(int argc, const char **argv)
 		return status;
 	}
 
-	pc = poptGetContext("group_setinfo", argc, argv, long_options, 0);
+	pc = poptGetContext("localgroup_delmembers", argc, argv, long_options, 0);
 
-	poptSetOtherOptionHelp(pc, "hostname groupname level option");
+	poptSetOtherOptionHelp(pc, "hostname groupname member1 member2 ...");
 	while((opt = poptGetNextOpt(pc)) != -1) {
 	}
 
@@ -80,58 +77,60 @@ int main(int argc, const char **argv)
 		poptPrintHelp(pc, stderr, 0);
 		goto out;
 	}
-	level = atoi(poptGetArg(pc));
 
-	if (!poptPeekArg(pc)) {
-		poptPrintHelp(pc, stderr, 0);
-		goto out;
+	names = poptGetArgs(pc);
+	for (i=0; names[i] != NULL; i++) {
+		total_entries++;
 	}
-	option = poptGetArg(pc);
-
-	/* NetGroupSetInfo */
 
 	switch (level) {
 		case 0:
-			g0.grpi0_name = option;
-			buffer = (uint8_t *)&g0;
-			break;
-		case 1:
-			g1.grpi1_name = option; /* this one will be ignored */
-			g1.grpi1_comment = option;
-			buffer = (uint8_t *)&g1;
-			break;
-		case 2:
-			g2.grpi2_name = option; /* this one will be ignored */
-			g2.grpi2_comment = option;
-			g2.grpi2_group_id = 4711; /* this one will be ignored */
-			g2.grpi2_attributes = 7;
-			buffer = (uint8_t *)&g2;
+			status = NetApiBufferAllocate(sizeof(struct LOCALGROUP_MEMBERS_INFO_0) * total_entries,
+						      (void **)&g0);
+			if (status) {
+				printf("NetApiBufferAllocate failed with: %s\n",
+					libnetapi_get_error_string(ctx, status));
+				goto out;
+			}
+
+			for (i=0; i<total_entries; i++) {
+				if (!ConvertStringSidToSid(names[i], &g0[i].lgrmi0_sid)) {
+					printf("could not convert sid\n");
+					goto out;
+				}
+			}
+
+			buffer = (uint8_t *)g0;
 			break;
 		case 3:
-			g3.grpi3_name = option; /* this one will be ignored */
-			g3.grpi3_comment = option;
-			g2.grpi2_attributes = 7;
-			buffer = (uint8_t *)&g3;
-			break;
-		case 1002:
-			g1002.grpi1002_comment = option;
-			buffer = (uint8_t *)&g1002;
+			status = NetApiBufferAllocate(sizeof(struct LOCALGROUP_MEMBERS_INFO_3) * total_entries,
+						      (void **)&g3);
+			if (status) {
+				printf("NetApiBufferAllocate failed with: %s\n",
+					libnetapi_get_error_string(ctx, status));
+				goto out;
+			}
+
+			for (i=0; i<total_entries; i++) {
+				g3[i].lgrmi3_domainandname = names[i];
+			}
+
+			buffer = (uint8_t *)g3;
 			break;
-		case 1005:
-			g1005.grpi1005_attributes = atoi(option);
-			buffer = (uint8_t *)&g1005;
+		default:
 			break;
 	}
 
-	status = NetGroupSetInfo(hostname,
-				 groupname,
-				 level,
-				 buffer,
-				 &parm_err);
+	/* NetLocalGroupDelMembers */
+
+	status = NetLocalGroupDelMembers(hostname,
+					 groupname,
+					 level,
+					 buffer,
+					 total_entries);
 	if (status != 0) {
-		printf("NetGroupSetInfo failed with: %s\n",
+		printf("NetLocalGroupDelMembers failed with: %s\n",
 			libnetapi_get_error_string(ctx, status));
-		goto out;
 	}
 
  out:
diff --git a/source/lib/netapi/examples/group/group_setinfo.c b/source/lib/netapi/examples/localgroup/localgroup_setmembers.c
similarity index 55%
copy from source/lib/netapi/examples/group/group_setinfo.c
copy to source/lib/netapi/examples/localgroup/localgroup_setmembers.c
index cd30d8b..acee5cd 100644
--- a/source/lib/netapi/examples/group/group_setinfo.c
+++ b/source/lib/netapi/examples/localgroup/localgroup_setmembers.c
@@ -1,6 +1,6 @@
 /*
  *  Unix SMB/CIFS implementation.
- *  NetGroupSetInfo query
+ *  NetLocalGroupSetMembers query
  *  Copyright (C) Guenther Deschner 2008
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -33,16 +33,13 @@ int main(int argc, const char **argv)
 	struct libnetapi_ctx *ctx = NULL;
 	const char *hostname = NULL;
 	const char *groupname = NULL;
-	const char *option = NULL;
+	struct LOCALGROUP_MEMBERS_INFO_0 *g0;
+	struct LOCALGROUP_MEMBERS_INFO_3 *g3;
+	uint32_t total_entries = 0;
 	uint8_t *buffer = NULL;
-	uint32_t level = 0;
-	uint32_t parm_err = 0;
-	struct GROUP_INFO_0 g0;
-	struct GROUP_INFO_1 g1;
-	struct GROUP_INFO_2 g2;
-	struct GROUP_INFO_3 g3;
-	struct GROUP_INFO_1002 g1002;
-	struct GROUP_INFO_1005 g1005;
+	uint32_t level = 3;
+	const char **names = NULL;
+	int i = 0;
 
 	poptContext pc;
 	int opt;
@@ -58,9 +55,9 @@ int main(int argc, const char **argv)
 		return status;
 	}
 
-	pc = poptGetContext("group_setinfo", argc, argv, long_options, 0);
+	pc = poptGetContext("localgroup_setmembers", argc, argv, long_options, 0);
 
-	poptSetOtherOptionHelp(pc, "hostname groupname level option");
+	poptSetOtherOptionHelp(pc, "hostname groupname member1 member2 ...");
 	while((opt = poptGetNextOpt(pc)) != -1) {
 	}
 
@@ -80,58 +77,60 @@ int main(int argc, const char **argv)
 		poptPrintHelp(pc, stderr, 0);
 		goto out;
 	}
-	level = atoi(poptGetArg(pc));
 
-	if (!poptPeekArg(pc)) {
-		poptPrintHelp(pc, stderr, 0);
-		goto out;
+	names = poptGetArgs(pc);
+	for (i=0; names[i] != NULL; i++) {
+		total_entries++;
 	}
-	option = poptGetArg(pc);
-
-	/* NetGroupSetInfo */
 
 	switch (level) {
 		case 0:
-			g0.grpi0_name = option;
-			buffer = (uint8_t *)&g0;
-			break;
-		case 1:
-			g1.grpi1_name = option; /* this one will be ignored */
-			g1.grpi1_comment = option;
-			buffer = (uint8_t *)&g1;
-			break;
-		case 2:
-			g2.grpi2_name = option; /* this one will be ignored */
-			g2.grpi2_comment = option;
-			g2.grpi2_group_id = 4711; /* this one will be ignored */
-			g2.grpi2_attributes = 7;
-			buffer = (uint8_t *)&g2;
+			status = NetApiBufferAllocate(sizeof(struct LOCALGROUP_MEMBERS_INFO_0) * total_entries,
+						      (void **)&g0);
+			if (status) {
+				printf("NetApiBufferAllocate failed with: %s\n",
+					libnetapi_get_error_string(ctx, status));
+				goto out;
+			}
+
+			for (i=0; i<total_entries; i++) {
+				if (!ConvertStringSidToSid(names[i], &g0[i].lgrmi0_sid)) {
+					printf("could not convert sid\n");
+					goto out;
+				}
+			}
+
+			buffer = (uint8_t *)g0;
 			break;
 		case 3:
-			g3.grpi3_name = option; /* this one will be ignored */
-			g3.grpi3_comment = option;
-			g2.grpi2_attributes = 7;
-			buffer = (uint8_t *)&g3;
-			break;
-		case 1002:
-			g1002.grpi1002_comment = option;
-			buffer = (uint8_t *)&g1002;
+			status = NetApiBufferAllocate(sizeof(struct LOCALGROUP_MEMBERS_INFO_3) * total_entries,
+						      (void **)&g3);
+			if (status) {
+				printf("NetApiBufferAllocate failed with: %s\n",
+					libnetapi_get_error_string(ctx, status));
+				goto out;
+			}
+
+			for (i=0; i<total_entries; i++) {
+				g3[i].lgrmi3_domainandname = names[i];
+			}
+
+			buffer = (uint8_t *)g3;
 			break;
-		case 1005:
-			g1005.grpi1005_attributes = atoi(option);
-			buffer = (uint8_t *)&g1005;
+		default:
 			break;
 	}
 
-	status = NetGroupSetInfo(hostname,
-				 groupname,
-				 level,
-				 buffer,
-				 &parm_err);
+	/* NetLocalGroupSetMembers */
+
+	status = NetLocalGroupSetMembers(hostname,
+					 groupname,
+					 level,
+					 buffer,
+					 total_entries);
 	if (status != 0) {
-		printf("NetGroupSetInfo failed with: %s\n",
+		printf("NetLocalGroupSetMembers failed with: %s\n",
 			libnetapi_get_error_string(ctx, status));
-		goto out;
 	}
 
  out:
diff --git a/source/lib/netapi/libnetapi.c b/source/lib/netapi/libnetapi.c
index adc875d..5fe4807 100644
--- a/source/lib/netapi/libnetapi.c
+++ b/source/lib/netapi/libnetapi.c
@@ -1481,6 +1481,205 @@ NET_API_STATUS NetLocalGroupEnum(const char * server_name /* [in] */,
 }
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list