[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-1014-g459233e

Volker Lendecke vlendec at samba.org
Sun Aug 16 04:39:46 MDT 2009


The branch, master has been updated
       via  459233e6309afc93499d6b8cfd46e93e4e7d5cf3 (commit)
       via  a511a875197778e9f032f442d8cd6a48b4e47f69 (commit)
       via  3f3f49d5e23b92051508b2555688417865f668b0 (commit)
       via  27dd290d3fe68ee1c4fd8a795335010c721b28a0 (commit)
       via  886e183b0e6ed3a13b3ce74068fff761d9635bcc (commit)
       via  c83bf9cd7e147655cf3796a7dc1ed4b27ead6ebd (commit)
       via  8a683f489695b094ef91960f6fda4c8c57407682 (commit)
       via  3d46eaf4110b22b9328466009436f1d3fa9d88e5 (commit)
       via  1a22baa817291f5d067dccfb9e4b754781d2fb6f (commit)
      from  5ae122ed7a76e984cc9a8524c03a94bfe42232e3 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 459233e6309afc93499d6b8cfd46e93e4e7d5cf3
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Aug 16 12:23:31 2009 +0200

    s3:winbind: Convert WINBINDD_GETGRNAM to the new API

commit a511a875197778e9f032f442d8cd6a48b4e47f69
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Aug 16 12:13:00 2009 +0200

    s3:winbind: Convert WINBINDD_GETGRGID to the new API

commit 3f3f49d5e23b92051508b2555688417865f668b0
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Aug 16 12:09:37 2009 +0200

    s3:winbind: Add winbindd_print_groupmem
    
    This converts a talloc_dict retrieved from wb_group_members to the string
    that the pipe protocol expects

commit 27dd290d3fe68ee1c4fd8a795335010c721b28a0
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Aug 16 12:08:52 2009 +0200

    s3:winbind: Make fill_grent publically available

commit 886e183b0e6ed3a13b3ce74068fff761d9635bcc
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Aug 16 12:07:32 2009 +0200

    s3:winbind: Add const to normalize_name_map

commit c83bf9cd7e147655cf3796a7dc1ed4b27ead6ebd
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Aug 16 11:25:31 2009 +0200

    s3:winbind: Add async wb_getgrsid

commit 8a683f489695b094ef91960f6fda4c8c57407682
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Aug 16 10:58:43 2009 +0200

    s3:winbind: Add async wb_group_members

commit 3d46eaf4110b22b9328466009436f1d3fa9d88e5
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Aug 8 16:24:29 2009 +0200

    s3:winbind: Make wcache_lookup_groupmem available publically

commit 1a22baa817291f5d067dccfb9e4b754781d2fb6f
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Aug 16 10:44:06 2009 +0200

    s3: Add talloc_dict.[ch]

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

Summary of changes:
 source3/Makefile.in                  |    5 +
 source3/include/includes.h           |    1 +
 source3/include/talloc_dict.h        |   60 ++++
 source3/lib/talloc_dict.c            |  148 ++++++++++
 source3/librpc/gen_ndr/cli_wbint.c   |  165 +++++++++++
 source3/librpc/gen_ndr/cli_wbint.h   |   14 +
 source3/librpc/gen_ndr/ndr_wbint.c   |  224 +++++++++++++++-
 source3/librpc/gen_ndr/ndr_wbint.h   |   11 +-
 source3/librpc/gen_ndr/srv_wbint.c   |   93 +++++++
 source3/librpc/gen_ndr/srv_wbint.h   |    2 +
 source3/librpc/gen_ndr/wbint.h       |   25 ++
 source3/librpc/idl/wbint.idl         |   17 ++
 source3/torture/torture.c            |   48 ++++
 source3/winbindd/wb_getgrsid.c       |  151 +++++++++++
 source3/winbindd/wb_group_members.c  |  496 ++++++++++++++++++++++++++++++++++
 source3/winbindd/winbindd.c          |    6 +-
 source3/winbindd/winbindd_cache.c    |   78 ++++--
 source3/winbindd/winbindd_dual_srv.c |   38 +++
 source3/winbindd/winbindd_getgrgid.c |  134 +++++++++
 source3/winbindd/winbindd_getgrnam.c |  190 +++++++++++++
 source3/winbindd/winbindd_group.c    |  380 +++++---------------------
 source3/winbindd/winbindd_proto.h    |   44 +++-
 source3/winbindd/winbindd_util.c     |    2 +-
 23 files changed, 1994 insertions(+), 338 deletions(-)
 create mode 100644 source3/include/talloc_dict.h
 create mode 100644 source3/lib/talloc_dict.c
 create mode 100644 source3/winbindd/wb_getgrsid.c
 create mode 100644 source3/winbindd/wb_group_members.c
 create mode 100644 source3/winbindd/winbindd_getgrgid.c
 create mode 100644 source3/winbindd/winbindd_getgrnam.c


Changeset truncated at 500 lines:

diff --git a/source3/Makefile.in b/source3/Makefile.in
index f1c645a..f1fac93 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -375,6 +375,7 @@ LIB_OBJ = $(LIBSAMBAUTIL_OBJ) $(UTIL_OBJ) $(CRYPTO_OBJ) \
 	  lib/messages.o librpc/gen_ndr/ndr_messaging.o lib/messages_local.o \
 	  lib/messages_ctdbd.o lib/packet.o lib/ctdbd_conn.o \
 	  lib/interfaces.o lib/memcache.o \
+	  lib/talloc_dict.o \
 	  lib/util_transfer_file.o ../lib/async_req/async_sock.o \
 	  $(TDB_LIB_OBJ) \
 	  $(VERSION_OBJ) lib/charcnv.o lib/debug.o lib/fault.o \
@@ -1166,6 +1167,8 @@ WINBINDD_OBJ1 = \
 		winbindd/wb_gettoken.o \
 		winbindd/wb_seqnum.o \
 		winbindd/wb_seqnums.o \
+		winbindd/wb_group_members.o \
+		winbindd/wb_getgrsid.o \
 		winbindd/winbindd_lookupsid.o \
 		winbindd/winbindd_lookupname.o \
 		winbindd/winbindd_sid_to_uid.o \
@@ -1179,6 +1182,8 @@ WINBINDD_OBJ1 = \
 		winbindd/winbindd_getuserdomgroups.o \
 		winbindd/winbindd_getgroups.o \
 		winbindd/winbindd_show_sequence.o \
+		winbindd/winbindd_getgrgid.o \
+		winbindd/winbindd_getgrnam.o \
 		auth/token_util.o \
 		../nsswitch/libwbclient/wb_reqtrans.o \
 		smbd/connection.o
diff --git a/source3/include/includes.h b/source3/include/includes.h
index 2d82e6e..87df3b7 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -689,6 +689,7 @@ struct smb_iconv_convenience *lp_iconv_convenience(void *lp_ctx);
 #include "memcache.h"
 #include "async_smb.h"
 #include "../lib/async_req/async_sock.h"
+#include "talloc_dict.h"
 #include "services.h"
 #include "eventlog.h"
 #include "../lib/util/smb_threads.h"
diff --git a/source3/include/talloc_dict.h b/source3/include/talloc_dict.h
new file mode 100644
index 0000000..8305f8d
--- /dev/null
+++ b/source3/include/talloc_dict.h
@@ -0,0 +1,60 @@
+/*
+   Unix SMB/CIFS implementation.
+   Little dictionary style data structure based on dbwrap_rbt
+   Copyright (C) Volker Lendecke 2009
+
+   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/>.
+*/
+
+#ifndef __TALLOC_DICT_H__
+#define __TALLOC_DICT_H__
+
+#include "includes.h"
+
+struct talloc_dict;
+
+/*
+ * Create a talloc_dict structure.
+ */
+
+struct talloc_dict *talloc_dict_init(TALLOC_CTX *mem_ctx);
+
+/*
+ * Add a talloced object to the dict. Nulls out the pointer to indicate that
+ * the talloc ownership has been taken. If an object for "key" already exists,
+ * the existing object is talloc_free()ed and overwritten by the new
+ * object. If "data" is NULL, object for key "key" is deleted. Return false
+ * for "no memory".
+ */
+
+bool talloc_dict_set(struct talloc_dict *dict, DATA_BLOB key, void *data);
+
+/*
+ * Fetch a talloced object. If "mem_ctx!=NULL", talloc_move the object there
+ * and delete it from the dict.
+ */
+
+void *talloc_dict_fetch(struct talloc_dict *dict, DATA_BLOB key,
+			TALLOC_CTX *mem_ctx);
+
+/*
+ * Traverse a talloc_dict. If "fn" returns non-null, quit the traverse
+ */
+
+int talloc_dict_traverse(struct talloc_dict *dict,
+			 int (*fn)(DATA_BLOB key, void *data,
+				   void *private_data),
+			 void *private_data);
+
+#endif
diff --git a/source3/lib/talloc_dict.c b/source3/lib/talloc_dict.c
new file mode 100644
index 0000000..18b88d9
--- /dev/null
+++ b/source3/lib/talloc_dict.c
@@ -0,0 +1,148 @@
+/*
+   Unix SMB/CIFS implementation.
+   Little dictionary style data structure based on dbwrap_rbt
+   Copyright (C) Volker Lendecke 2009
+
+   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"
+
+struct talloc_dict {
+	struct db_context *db;
+};
+
+struct talloc_dict *talloc_dict_init(TALLOC_CTX *mem_ctx)
+{
+	struct talloc_dict *result;
+
+	result = talloc(mem_ctx, struct talloc_dict);
+	if (result == NULL) {
+		return NULL;
+	}
+	result->db = db_open_rbt(result);
+	if (result->db == NULL) {
+		TALLOC_FREE(result);
+		return NULL;
+	}
+	return result;
+}
+
+/*
+ * Add a talloced object to the dict. Nulls out the pointer to indicate that
+ * the talloc ownership has been taken. If an object for "key" already exists,
+ * the existing object is talloc_free()ed and overwritten by the new
+ * object. If "data" is NULL, object for key "key" is deleted. Return false
+ * for "no memory".
+ */
+
+bool talloc_dict_set(struct talloc_dict *dict, DATA_BLOB key, void *pdata)
+{
+	struct db_record *rec;
+	NTSTATUS status = NT_STATUS_OK;
+	void *data = *(void **)pdata;
+
+	rec = dict->db->fetch_locked(dict->db, talloc_tos(),
+				     make_tdb_data(key.data, key.length));
+	if (rec == NULL) {
+		return false;
+	}
+	if (rec->value.dsize != 0) {
+		void *old_data;
+		if (rec->value.dsize != sizeof(void *)) {
+			TALLOC_FREE(rec);
+			return false;
+		}
+		old_data = *(void **)(rec->value.dptr);
+		TALLOC_FREE(old_data);
+		if (data == NULL) {
+			status = rec->delete_rec(rec);
+		}
+	}
+	if (data != NULL) {
+		void *mydata = talloc_move(dict->db, &data);
+		*(void **)pdata = NULL;
+		status = rec->store(rec, make_tdb_data((uint8_t *)&mydata,
+						       sizeof(mydata)), 0);
+	}
+	TALLOC_FREE(rec);
+	return NT_STATUS_IS_OK(status);
+}
+
+/*
+ * Fetch a talloced object. If "mem_ctx!=NULL", talloc_move the object there
+ * and delete it from the dict.
+ */
+
+void *talloc_dict_fetch(struct talloc_dict *dict, DATA_BLOB key,
+			TALLOC_CTX *mem_ctx)
+{
+	struct db_record *rec;
+	void *result;
+
+	rec = dict->db->fetch_locked(dict->db, talloc_tos(),
+				     make_tdb_data(key.data, key.length));
+	if (rec == NULL) {
+		return NULL;
+	}
+	if (rec->value.dsize != sizeof(void *)) {
+		TALLOC_FREE(rec);
+		return NULL;
+	}
+	result = *(void **)rec->value.dptr;
+
+	if (mem_ctx != NULL) {
+		NTSTATUS status;
+		status = rec->delete_rec(rec);
+		if (!NT_STATUS_IS_OK(status)) {
+			TALLOC_FREE(rec);
+			return NULL;
+		}
+		result = talloc_move(mem_ctx, &result);
+	}
+
+	return result;
+}
+
+struct talloc_dict_traverse_state {
+	int (*fn)(DATA_BLOB key, void *data, void *private_data);
+	void *private_data;
+};
+
+static int talloc_dict_traverse_fn(struct db_record *rec, void *private_data)
+{
+	struct talloc_dict_traverse_state *state =
+		(struct talloc_dict_traverse_state *)private_data;
+
+	if (rec->value.dsize != sizeof(void *)) {
+		return -1;
+	}
+	return state->fn(data_blob_const(rec->key.dptr, rec->key.dsize),
+			 *(void **)rec->value.dptr, state->private_data);
+}
+
+/*
+ * Traverse a talloc_dict. If "fn" returns non-null, quit the traverse
+ */
+
+int talloc_dict_traverse(struct talloc_dict *dict,
+			 int (*fn)(DATA_BLOB key, void *data,
+				   void *private_data),
+			 void *private_data)
+{
+	struct talloc_dict_traverse_state state;
+	state.fn = fn;
+	state.private_data = private_data;
+	return dict->db->traverse(dict->db, talloc_dict_traverse_fn, &state);
+}
diff --git a/source3/librpc/gen_ndr/cli_wbint.c b/source3/librpc/gen_ndr/cli_wbint.c
index 07486c2..ab9d984 100644
--- a/source3/librpc/gen_ndr/cli_wbint.c
+++ b/source3/librpc/gen_ndr/cli_wbint.c
@@ -1801,3 +1801,168 @@ NTSTATUS rpccli_wbint_QuerySequenceNumber(struct rpc_pipe_client *cli,
 	/* Return result */
 	return r.out.result;
 }
+
+struct rpccli_wbint_LookupGroupMembers_state {
+	struct wbint_LookupGroupMembers orig;
+	struct wbint_LookupGroupMembers tmp;
+	TALLOC_CTX *out_mem_ctx;
+	NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
+};
+
+static void rpccli_wbint_LookupGroupMembers_done(struct tevent_req *subreq);
+
+struct tevent_req *rpccli_wbint_LookupGroupMembers_send(TALLOC_CTX *mem_ctx,
+							struct tevent_context *ev,
+							struct rpc_pipe_client *cli,
+							struct dom_sid *_sid /* [in] [ref] */,
+							enum lsa_SidType _type /* [in]  */,
+							struct wbint_GroupMembers *_members /* [out] [ref] */)
+{
+	struct tevent_req *req;
+	struct rpccli_wbint_LookupGroupMembers_state *state;
+	struct tevent_req *subreq;
+
+	req = tevent_req_create(mem_ctx, &state,
+				struct rpccli_wbint_LookupGroupMembers_state);
+	if (req == NULL) {
+		return NULL;
+	}
+	state->out_mem_ctx = NULL;
+	state->dispatch_recv = cli->dispatch_recv;
+
+	/* In parameters */
+	state->orig.in.sid = _sid;
+	state->orig.in.type = _type;
+
+	/* Out parameters */
+	state->orig.out.members = _members;
+
+	/* Result */
+	ZERO_STRUCT(state->orig.out.result);
+
+	if (DEBUGLEVEL >= 10) {
+		NDR_PRINT_IN_DEBUG(wbint_LookupGroupMembers, &state->orig);
+	}
+
+	state->out_mem_ctx = talloc_named_const(state, 0,
+			     "rpccli_wbint_LookupGroupMembers_out_memory");
+	if (tevent_req_nomem(state->out_mem_ctx, req)) {
+		return tevent_req_post(req, ev);
+	}
+
+	/* make a temporary copy, that we pass to the dispatch function */
+	state->tmp = state->orig;
+
+	subreq = cli->dispatch_send(state, ev, cli,
+				    &ndr_table_wbint,
+				    NDR_WBINT_LOOKUPGROUPMEMBERS,
+				    &state->tmp);
+	if (tevent_req_nomem(subreq, req)) {
+		return tevent_req_post(req, ev);
+	}
+	tevent_req_set_callback(subreq, rpccli_wbint_LookupGroupMembers_done, req);
+	return req;
+}
+
+static void rpccli_wbint_LookupGroupMembers_done(struct tevent_req *subreq)
+{
+	struct tevent_req *req = tevent_req_callback_data(
+		subreq, struct tevent_req);
+	struct rpccli_wbint_LookupGroupMembers_state *state = tevent_req_data(
+		req, struct rpccli_wbint_LookupGroupMembers_state);
+	NTSTATUS status;
+	TALLOC_CTX *mem_ctx;
+
+	if (state->out_mem_ctx) {
+		mem_ctx = state->out_mem_ctx;
+	} else {
+		mem_ctx = state;
+	}
+
+	status = state->dispatch_recv(subreq, mem_ctx);
+	TALLOC_FREE(subreq);
+	if (!NT_STATUS_IS_OK(status)) {
+		tevent_req_nterror(req, status);
+		return;
+	}
+
+	/* Copy out parameters */
+	*state->orig.out.members = *state->tmp.out.members;
+
+	/* Copy result */
+	state->orig.out.result = state->tmp.out.result;
+
+	/* Reset temporary structure */
+	ZERO_STRUCT(state->tmp);
+
+	if (DEBUGLEVEL >= 10) {
+		NDR_PRINT_OUT_DEBUG(wbint_LookupGroupMembers, &state->orig);
+	}
+
+	tevent_req_done(req);
+}
+
+NTSTATUS rpccli_wbint_LookupGroupMembers_recv(struct tevent_req *req,
+					      TALLOC_CTX *mem_ctx,
+					      NTSTATUS *result)
+{
+	struct rpccli_wbint_LookupGroupMembers_state *state = tevent_req_data(
+		req, struct rpccli_wbint_LookupGroupMembers_state);
+	NTSTATUS status;
+
+	if (tevent_req_is_nterror(req, &status)) {
+		tevent_req_received(req);
+		return status;
+	}
+
+	/* Steal possbile out parameters to the callers context */
+	talloc_steal(mem_ctx, state->out_mem_ctx);
+
+	/* Return result */
+	*result = state->orig.out.result;
+
+	tevent_req_received(req);
+	return NT_STATUS_OK;
+}
+
+NTSTATUS rpccli_wbint_LookupGroupMembers(struct rpc_pipe_client *cli,
+					 TALLOC_CTX *mem_ctx,
+					 struct dom_sid *sid /* [in] [ref] */,
+					 enum lsa_SidType type /* [in]  */,
+					 struct wbint_GroupMembers *members /* [out] [ref] */)
+{
+	struct wbint_LookupGroupMembers r;
+	NTSTATUS status;
+
+	/* In parameters */
+	r.in.sid = sid;
+	r.in.type = type;
+
+	if (DEBUGLEVEL >= 10) {
+		NDR_PRINT_IN_DEBUG(wbint_LookupGroupMembers, &r);
+	}
+
+	status = cli->dispatch(cli,
+				mem_ctx,
+				&ndr_table_wbint,
+				NDR_WBINT_LOOKUPGROUPMEMBERS,
+				&r);
+
+	if (!NT_STATUS_IS_OK(status)) {
+		return status;
+	}
+
+	if (DEBUGLEVEL >= 10) {
+		NDR_PRINT_OUT_DEBUG(wbint_LookupGroupMembers, &r);
+	}
+
+	if (NT_STATUS_IS_ERR(status)) {
+		return status;
+	}
+
+	/* Return variables */
+	*members = *r.out.members;
+
+	/* Return result */
+	return r.out.result;
+}
diff --git a/source3/librpc/gen_ndr/cli_wbint.h b/source3/librpc/gen_ndr/cli_wbint.h
index ded9330..d5b333f 100644
--- a/source3/librpc/gen_ndr/cli_wbint.h
+++ b/source3/librpc/gen_ndr/cli_wbint.h
@@ -148,4 +148,18 @@ NTSTATUS rpccli_wbint_QuerySequenceNumber_recv(struct tevent_req *req,
 NTSTATUS rpccli_wbint_QuerySequenceNumber(struct rpc_pipe_client *cli,
 					  TALLOC_CTX *mem_ctx,
 					  uint32_t *sequence /* [out] [ref] */);
+struct tevent_req *rpccli_wbint_LookupGroupMembers_send(TALLOC_CTX *mem_ctx,
+							struct tevent_context *ev,
+							struct rpc_pipe_client *cli,
+							struct dom_sid *_sid /* [in] [ref] */,
+							enum lsa_SidType _type /* [in]  */,
+							struct wbint_GroupMembers *_members /* [out] [ref] */);
+NTSTATUS rpccli_wbint_LookupGroupMembers_recv(struct tevent_req *req,
+					      TALLOC_CTX *mem_ctx,
+					      NTSTATUS *result);
+NTSTATUS rpccli_wbint_LookupGroupMembers(struct rpc_pipe_client *cli,
+					 TALLOC_CTX *mem_ctx,
+					 struct dom_sid *sid /* [in] [ref] */,
+					 enum lsa_SidType type /* [in]  */,
+					 struct wbint_GroupMembers *members /* [out] [ref] */);
 #endif /* __CLI_WBINT__ */
diff --git a/source3/librpc/gen_ndr/ndr_wbint.c b/source3/librpc/gen_ndr/ndr_wbint.c
index 295b72f..bb0d01b 100644
--- a/source3/librpc/gen_ndr/ndr_wbint.c
+++ b/source3/librpc/gen_ndr/ndr_wbint.c
@@ -290,6 +290,140 @@ _PUBLIC_ void ndr_print_wbint_RidArray(struct ndr_print *ndr, const char *name,
 	ndr->depth--;
 }
 
+_PUBLIC_ enum ndr_err_code ndr_push_wbint_GroupMember(struct ndr_push *ndr, int ndr_flags, const struct wbint_GroupMember *r)
+{
+	if (ndr_flags & NDR_SCALARS) {
+		NDR_CHECK(ndr_push_align(ndr, 4));
+		NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, &r->sid));
+		NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
+		NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, r->type));
+	}
+	if (ndr_flags & NDR_BUFFERS) {
+		if (r->name) {
+			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF8)));
+			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF8)));
+			NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
+		}
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_wbint_GroupMember(struct ndr_pull *ndr, int ndr_flags, struct wbint_GroupMember *r)
+{
+	uint32_t _ptr_name;
+	TALLOC_CTX *_mem_save_name_0;
+	if (ndr_flags & NDR_SCALARS) {
+		NDR_CHECK(ndr_pull_align(ndr, 4));
+		NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, &r->sid));
+		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
+		if (_ptr_name) {
+			NDR_PULL_ALLOC(ndr, r->name);
+		} else {
+			r->name = NULL;
+		}
+		NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, &r->type));
+	}


-- 
Samba Shared Repository


More information about the samba-cvs mailing list