[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha3-41-g8c27941

Kai Blin kai at samba.org
Wed Apr 2 21:09:39 GMT 2008


The branch, v4-0-test has been updated
       via  8c27941171999d2d42834b92a2693aca0435d345 (commit)
       via  206b7d387c6d17e5cc40fd45b489abac9235a7a4 (commit)
       via  018eb64f038210279b90925e6a981c067aef4be9 (commit)
       via  ac5e5fee1db2999053dee82d1fcf97ca8799c9b5 (commit)
       via  2908a77fa5c32e92665775a5785345f704202f0a (commit)
       via  25cbb1b76720a271984ad5c023e45476094562f1 (commit)
       via  033db9730f1aa6d1941fbb83f55578aaa75e28bd (commit)
       via  3e3563f2840e7cd795f5fc157003af3c932cb4d1 (commit)
       via  02c7913bf29ab8cc7e9ce3efe854c02a3c3200cc (commit)
       via  0e66e443ad42f9644aafc1858ac8d01c7c699337 (commit)
       via  38413ed4b6957e5f72e78a04f479c6a5d8b69ef5 (commit)
      from  fc50e78e2631e8253571bc236302e2859e4d1559 (commit)

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


- Log -----------------------------------------------------------------
commit 8c27941171999d2d42834b92a2693aca0435d345
Author: Kai Blin <kai at samba.org>
Date:   Fri Mar 28 23:36:05 2008 +0100

    WHATSNEW: Added information about the new idmap system

commit 206b7d387c6d17e5cc40fd45b489abac9235a7a4
Author: Kai Blin <kai at samba.org>
Date:   Tue Apr 1 00:17:00 2008 +0200

    provision: Set up id mappings in the idmap db, only map Administrator.

commit 018eb64f038210279b90925e6a981c067aef4be9
Author: Kai Blin <kai at samba.org>
Date:   Tue Apr 1 00:05:02 2008 +0200

    idmap: Also store sid type in the idmap db

commit ac5e5fee1db2999053dee82d1fcf97ca8799c9b5
Author: Kai Blin <kai at samba.org>
Date:   Fri Mar 28 23:29:01 2008 +0100

    ntvfs: Use wbclient for pvfs_acl and pvfs_acl_nfs4

commit 2908a77fa5c32e92665775a5785345f704202f0a
Author: Kai Blin <kai at samba.org>
Date:   Fri Mar 28 11:00:52 2008 +0100

    ntvfs: Use wbclient in vsf_unixuid, not sidmap

commit 25cbb1b76720a271984ad5c023e45476094562f1
Author: Kai Blin <kai at samba.org>
Date:   Sat Mar 22 08:33:26 2008 +0100

    rpc_server: Remove references to sidmap from the lsa pipe code.

commit 033db9730f1aa6d1941fbb83f55578aaa75e28bd
Author: Kai Blin <kai at samba.org>
Date:   Wed Mar 19 19:34:32 2008 +0100

    rpc_server: Use wbclient instead of sidmap in unixinfo pipe

commit 3e3563f2840e7cd795f5fc157003af3c932cb4d1
Author: Kai Blin <kai at samba.org>
Date:   Sat Mar 29 01:42:06 2008 +0100

    wbclient: Add an async winbind client library.

commit 02c7913bf29ab8cc7e9ce3efe854c02a3c3200cc
Author: Kai Blin <kai at samba.org>
Date:   Sat Mar 29 00:25:16 2008 +0100

    winbind: Bump down the debuglevel.

commit 0e66e443ad42f9644aafc1858ac8d01c7c699337
Author: Kai Blin <kai at samba.org>
Date:   Sat Mar 29 00:31:37 2008 +0100

    IRPC: Add include guards for the header.

commit 38413ed4b6957e5f72e78a04f479c6a5d8b69ef5
Author: Kai Blin <kai at samba.org>
Date:   Fri Mar 21 22:27:02 2008 +0100

    util: Add talloc_get_type_abort() call.

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

Summary of changes:
 WHATSNEW.txt                                 |    5 +
 source/headermap.txt                         |    4 +
 source/lib/messaging/irpc.h                  |    4 +
 source/lib/util/util.c                       |   15 ++
 source/lib/util/util.h                       |    7 +
 source/libcli/config.mk                      |    1 +
 source/libcli/wbclient/config.mk             |    6 +
 source/libcli/wbclient/wbclient.c            |  210 ++++++++++++++++++++++++++
 source/libcli/wbclient/wbclient.h            |   50 ++++++
 source/librpc/idl/lsa.idl                    |    2 +-
 source/librpc/idl/winbind.idl                |   34 ++++-
 source/ntvfs/posix/pvfs_acl.c                |  100 ++++++++++---
 source/ntvfs/posix/pvfs_acl_nfs4.c           |  106 ++++++++++----
 source/ntvfs/posix/vfs_posix.c               |    6 +-
 source/ntvfs/posix/vfs_posix.h               |    3 +-
 source/ntvfs/unixuid/vfs_unixuid.c           |   72 ++++++---
 source/rpc_server/config.mk                  |    3 +-
 source/rpc_server/lsa/lsa.h                  |    1 -
 source/rpc_server/lsa/lsa_init.c             |    5 -
 source/rpc_server/lsa/lsa_lookup.c           |    5 +-
 source/rpc_server/unixinfo/dcesrv_unixinfo.c |  160 +++++++++++++++-----
 source/scripting/python/samba/idmap.py       |   73 +++++++++
 source/scripting/python/samba/provision.py   |   98 ++++++------
 source/scripting/python/samba/samdb.py       |   19 ---
 source/winbind/idmap.c                       |  145 +++++++++---------
 source/winbind/idmap.h                       |   20 +---
 source/winbind/wb_irpc.c                     |   70 +++++++++
 source/winbind/wb_xids2sids.c                |    4 +-
 28 files changed, 942 insertions(+), 286 deletions(-)
 create mode 100644 source/libcli/wbclient/config.mk
 create mode 100644 source/libcli/wbclient/wbclient.c
 create mode 100644 source/libcli/wbclient/wbclient.h
 create mode 100644 source/scripting/python/samba/idmap.py


Changeset truncated at 500 lines:

diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 1e8f803..f58df49 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -97,6 +97,11 @@ continued to evolve, but you may particularly notice these areas:
   better integration with Windows administrative tools, especially
   Active Directory Users and Computers.
 
+  ID mapping: Samba4 now handles ID mapping via winbind. The mappings
+  are stored in a central ldb that could be shared across multiple
+  machines using LDAP. Internal callers access this interface via a new
+  wbclient library.
+
 These are just some of the highlights of the work done in the past few
 months.  More details can be found in our GIT history.
 
diff --git a/source/headermap.txt b/source/headermap.txt
index 8d4d78b..670b14c 100644
--- a/source/headermap.txt
+++ b/source/headermap.txt
@@ -66,4 +66,8 @@ param/share.h: share.h
 lib/util/util_tdb.h: util_tdb.h
 lib/util/util_ldb.h: util_ldb.h
 lib/util/wrap_xattr.h: wrap_xattr.h
+lib/events/events.h: events/events.h
+lib/events/events_internal.h: events/events_internal.h
 libcli/ldap/ldap_ndr.h: ldap_ndr.h
+libcli/wbclient/wbclient.h: wbclient/wbclient.h
+lib/gencache/gencache.h: gencache.h
diff --git a/source/lib/messaging/irpc.h b/source/lib/messaging/irpc.h
index d596c67..f44c0af 100644
--- a/source/lib/messaging/irpc.h
+++ b/source/lib/messaging/irpc.h
@@ -19,6 +19,9 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#ifndef IRPC_H
+#define IRPC_H
+
 #include "librpc/gen_ndr/irpc.h"
 
 /*
@@ -123,4 +126,5 @@ struct server_id *irpc_servers_byname(struct messaging_context *msg_ctx, TALLOC_
 void irpc_remove_name(struct messaging_context *msg_ctx, const char *name);
 NTSTATUS irpc_send_reply(struct irpc_message *m, NTSTATUS status);
 
+#endif
 
diff --git a/source/lib/util/util.c b/source/lib/util/util.c
index 7b6bfee..b5bb753 100644
--- a/source/lib/util/util.c
+++ b/source/lib/util/util.c
@@ -582,3 +582,18 @@ _PUBLIC_ void *realloc_array(void *ptr, size_t el_size, unsigned count)
 	return realloc(ptr, el_size * count);
 }
 
+_PUBLIC_ void *talloc_check_name_abort(const void *ptr, const char *name)
+{
+        void *result;
+
+        result = talloc_check_name(ptr, name);
+        if (result != NULL)
+                return result;
+
+        DEBUG(0, ("Talloc type mismatch, expected %s, got %s\n",
+                  name, talloc_get_name(ptr)));
+        smb_panic("talloc type mismatch");
+        /* Keep the compiler happy */
+        return NULL;
+}
+
diff --git a/source/lib/util/util.h b/source/lib/util/util.h
index 60c8437..3bf6b98 100644
--- a/source/lib/util/util.h
+++ b/source/lib/util/util.h
@@ -803,4 +803,11 @@ bool pm_process( const char *fileName,
                  bool (*pfunc)(const char *, const char *, void *),
 				 void *userdata);
 
+/**
+ * Add-on to talloc_get_type
+ */
+_PUBLIC_ void *talloc_check_name_abort(const void *ptr, const char *name);
+#define talloc_get_type_abort(ptr, type) \
+	(type *)talloc_check_name_abort(ptr, #type)
+
 #endif /* _SAMBA_UTIL_H_ */
diff --git a/source/libcli/config.mk b/source/libcli/config.mk
index b85fbe7..0c00fa2 100644
--- a/source/libcli/config.mk
+++ b/source/libcli/config.mk
@@ -1,6 +1,7 @@
 mkinclude auth/config.mk
 mkinclude ldap/config.mk
 mkinclude security/config.mk
+mkinclude wbclient/config.mk
 
 [SUBSYSTEM::LIBSAMBA-ERRORS]
 OBJ_FILES = util/doserr.o \
diff --git a/source/libcli/wbclient/config.mk b/source/libcli/wbclient/config.mk
new file mode 100644
index 0000000..32f2f5a
--- /dev/null
+++ b/source/libcli/wbclient/config.mk
@@ -0,0 +1,6 @@
+[SUBSYSTEM::LIBWBCLIENT]
+OBJ_FILES = wbclient.o
+PUBLIC_DEPENDENCIES = LIBSAMBA-ERRORS LIBEVENTS
+PRIVATE_DEPENDENCIES = NDR_WINBIND MESSAGING
+
+PUBLIC_HEADERS += libcli/wbclient/wbclient.h
diff --git a/source/libcli/wbclient/wbclient.c b/source/libcli/wbclient/wbclient.c
new file mode 100644
index 0000000..1b2d314
--- /dev/null
+++ b/source/libcli/wbclient/wbclient.c
@@ -0,0 +1,210 @@
+/*
+   Unix SMB/CIFS implementation.
+
+   Winbind client library.
+
+   Copyright (C) 2008 Kai Blin  <kai at samba.org>
+
+   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 "libcli/wbclient/wbclient.h"
+
+/**
+ * Get the server_id of the winbind task.
+ *
+ * \param[in] msg_ctx message context to use
+ * \param[in] mem_ctx talloc context to use
+ * \param[out] ids array of server_id structs containing the winbind id
+ * \return NT_STATUS_OK on success, NT_STATUS_INTERNAL_ERROR on failure
+ */
+static NTSTATUS get_server_id(struct messaging_context *msg_ctx,
+			      TALLOC_CTX *mem_ctx, struct server_id **ids)
+{
+	*ids = irpc_servers_byname(msg_ctx, mem_ctx, "winbind_server");
+	if (*ids == NULL || (*ids)[0].id == 0) {
+		DEBUG(0, ("Geting the winbind server ID failed.\n"));
+		return NT_STATUS_INTERNAL_ERROR;
+	}
+	return NT_STATUS_OK;
+}
+
+/**
+ * Initialize the wbclient context, talloc_free() when done.
+ *
+ * \param mem_ctx talloc context to allocate memory from
+ * \param msg_ctx message context to use
+ * \param
+ */
+struct wbc_context *wbc_init(TALLOC_CTX *mem_ctx,
+			     struct messaging_context *msg_ctx,
+			     struct event_context *event_ctx)
+{
+	struct wbc_context *ctx;
+	NTSTATUS status;
+
+	ctx = talloc(mem_ctx, struct wbc_context);
+	if (ctx == NULL) return NULL;
+
+	status = get_server_id(msg_ctx, mem_ctx, &ctx->ids);
+	if (!NT_STATUS_IS_OK(status)) {
+		talloc_free(ctx);
+		return NULL;
+	}
+
+	ctx->msg_ctx = msg_ctx;
+	ctx->event_ctx = event_ctx;
+
+	return ctx;
+}
+
+struct wbc_idmap_state {
+	struct composite_context *ctx;
+	struct winbind_get_idmap *req;
+	struct irpc_request *irpc_req;
+	struct id_mapping *ids;
+};
+
+static void sids_to_xids_recv_ids(struct irpc_request *req);
+
+struct composite_context *wbc_sids_to_xids_send(struct wbc_context *wbc_ctx,
+						TALLOC_CTX *mem_ctx,
+						uint32_t count,
+						struct id_mapping *ids)
+{
+	struct composite_context *ctx;
+	struct wbc_idmap_state *state;
+
+	DEBUG(5, ("wbc_sids_to_xids called\n"));
+
+	ctx = composite_create(mem_ctx, wbc_ctx->event_ctx);
+	if (ctx == NULL) return NULL;
+
+	state = talloc(ctx, struct wbc_idmap_state);
+	if (composite_nomem(state, ctx)) return ctx;
+	ctx->private_data = state;
+
+	state->req = talloc(state, struct winbind_get_idmap);
+	if (composite_nomem(state->req, ctx)) return ctx;
+
+	state->req->in.count = count;
+	state->req->in.level = WINBIND_IDMAP_LEVEL_SIDS_TO_XIDS;
+	state->req->in.ids = ids;
+	state->ctx = ctx;
+
+	state->irpc_req = IRPC_CALL_SEND(wbc_ctx->msg_ctx, wbc_ctx->ids[0],
+					 winbind, WINBIND_GET_IDMAP, state->req,
+					 state);
+	if (composite_nomem(state->irpc_req, ctx)) return ctx;
+
+	composite_continue_irpc(ctx, state->irpc_req, sids_to_xids_recv_ids,
+				state);
+	return ctx;
+}
+
+static void sids_to_xids_recv_ids(struct irpc_request *req)
+{
+	struct wbc_idmap_state *state = talloc_get_type_abort(
+							req->async.private,
+							struct wbc_idmap_state);
+
+	state->ctx->status = irpc_call_recv(state->irpc_req);
+	if (!composite_is_ok(state->ctx)) return;
+
+	state->ids = state->req->out.ids;
+	composite_done(state->ctx);
+}
+
+NTSTATUS wbc_sids_to_xids_recv(struct composite_context *ctx,
+			       struct id_mapping **ids)
+{
+	NTSTATUS status = composite_wait(ctx);
+		DEBUG(5, ("wbc_sids_to_xids_recv called\n"));
+	if (NT_STATUS_IS_OK(status)) {
+		struct wbc_idmap_state *state =	talloc_get_type_abort(
+							ctx->private_data,
+							struct wbc_idmap_state);
+		*ids = state->ids;
+	}
+
+	return status;
+}
+
+static void xids_to_sids_recv_ids(struct irpc_request *req);
+
+struct composite_context *wbc_xids_to_sids_send(struct wbc_context *wbc_ctx,
+						TALLOC_CTX *mem_ctx,
+						uint32_t count,
+						struct id_mapping *ids)
+{
+	struct composite_context *ctx;
+	struct wbc_idmap_state *state;
+
+	DEBUG(5, ("wbc_xids_to_sids called\n"));
+
+	ctx = composite_create(mem_ctx, wbc_ctx->event_ctx);
+	if (ctx == NULL) return NULL;
+
+	state = talloc(ctx, struct wbc_idmap_state);
+	if (composite_nomem(state, ctx)) return ctx;
+	ctx->private_data = state;
+
+	state->req = talloc(state, struct winbind_get_idmap);
+	if (composite_nomem(state->req, ctx)) return ctx;
+
+	state->req->in.count = count;
+	state->req->in.level = WINBIND_IDMAP_LEVEL_XIDS_TO_SIDS;
+	state->req->in.ids = ids;
+	state->ctx = ctx;
+
+	state->irpc_req = IRPC_CALL_SEND(wbc_ctx->msg_ctx, wbc_ctx->ids[0],
+					 winbind, WINBIND_GET_IDMAP, state->req,
+					 state);
+	if (composite_nomem(state->irpc_req, ctx)) return ctx;
+
+	composite_continue_irpc(ctx, state->irpc_req, xids_to_sids_recv_ids,
+			state);
+
+	return ctx;
+}
+
+static void xids_to_sids_recv_ids(struct irpc_request *req)
+{
+	struct wbc_idmap_state *state = talloc_get_type_abort(
+							req->async.private,
+							struct wbc_idmap_state);
+
+	state->ctx->status = irpc_call_recv(state->irpc_req);
+	if (!composite_is_ok(state->ctx)) return;
+
+	state->ids = state->req->out.ids;
+	composite_done(state->ctx);
+}
+
+NTSTATUS wbc_xids_to_sids_recv(struct composite_context *ctx,
+			       struct id_mapping **ids)
+{
+	NTSTATUS status = composite_wait(ctx);
+		DEBUG(5, ("wbc_xids_to_sids_recv called\n"));
+	if (NT_STATUS_IS_OK(status)) {
+		struct wbc_idmap_state *state =	talloc_get_type_abort(
+							ctx->private_data,
+							struct wbc_idmap_state);
+		*ids = state->ids;
+	}
+
+	return status;
+}
+
diff --git a/source/libcli/wbclient/wbclient.h b/source/libcli/wbclient/wbclient.h
new file mode 100644
index 0000000..099abaa
--- /dev/null
+++ b/source/libcli/wbclient/wbclient.h
@@ -0,0 +1,50 @@
+/*
+   Unix SMB/CIFS implementation.
+
+   Winbind client library.
+
+   Copyright (C) 2008 Kai Blin  <kai at samba.org>
+
+   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 "lib/messaging/irpc.h"
+#include "libcli/composite/composite.h"
+#include "librpc/gen_ndr/ndr_winbind.h"
+
+struct wbc_context {
+	struct messaging_context *msg_ctx;
+	struct event_context *event_ctx;
+	struct server_id *ids;
+};
+
+struct wbc_context *wbc_init(TALLOC_CTX *mem_ctx,
+			     struct messaging_context *msg_ctx,
+			     struct event_context *event_ctx);
+
+struct composite_context *wbc_sids_to_xids_send(struct wbc_context *wbc_ctx,
+						TALLOC_CTX *mem_ctx,
+						uint32_t count,
+						struct id_mapping *ids);
+
+NTSTATUS wbc_sids_to_xids_recv(struct composite_context *ctx,
+			       struct id_mapping **ids);
+
+struct composite_context *wbc_xids_to_sids_send(struct wbc_context *wbc_ctx,
+						TALLOC_CTX *mem_ctx,
+						uint32_t count,
+						struct id_mapping *ids);
+
+NTSTATUS wbc_xids_to_sids_recv(struct composite_context *ctx,
+			       struct id_mapping **ids);
+
diff --git a/source/librpc/idl/lsa.idl b/source/librpc/idl/lsa.idl
index 6d15822..e36e79f 100644
--- a/source/librpc/idl/lsa.idl
+++ b/source/librpc/idl/lsa.idl
@@ -338,7 +338,7 @@ import "misc.idl", "security.idl";
 
 	/******************/
 	/* Function: 0x0e */
-	typedef enum {
+	typedef [public] enum {
 		SID_NAME_USE_NONE = 0,/* NOTUSED */
 		SID_NAME_USER     = 1, /* user */
 		SID_NAME_DOM_GRP  = 2, /* domain group */
diff --git a/source/librpc/idl/winbind.idl b/source/librpc/idl/winbind.idl
index 29649c0..5cefb38 100644
--- a/source/librpc/idl/winbind.idl
+++ b/source/librpc/idl/winbind.idl
@@ -3,8 +3,8 @@
 */
 
 #include "idl_types.h"
-  
-import "netlogon.idl";
+
+import "netlogon.idl", "lsa.idl", "security.idl";
 
 [
   uuid("245f3e6b-3c5d-6e21-3a2d-2a3d645b7221"),
@@ -16,6 +16,24 @@ interface winbind
 	typedef [switch_type(uint16)] union netr_LogonLevel netr_LogonLevel;
 	typedef [switch_type(uint16)] union netr_Validation netr_Validation;
 
+	typedef enum {
+		ID_TYPE_NOT_SPECIFIED,
+		ID_TYPE_UID,
+		ID_TYPE_GID,
+		ID_TYPE_BOTH
+	} id_type;
+
+	typedef struct {
+		uint32 id;
+		id_type type;
+	} unixid;
+
+	typedef struct {
+		unixid *unixid;
+		dom_sid *sid;
+		NTSTATUS status;
+	} id_mapping;
+
 	/* a call to get runtime informations */
 	void winbind_information(/* TODO */);
 
@@ -35,4 +53,16 @@ interface winbind
 		[out] [switch_is(validation_level)] netr_Validation validation,
 		[out] uint8 authoritative
 	);
+
+	typedef [v1_enum] enum {
+		WINBIND_IDMAP_LEVEL_SIDS_TO_XIDS	= 1,
+		WINBIND_IDMAP_LEVEL_XIDS_TO_SIDS	= 2
+	} winbind_get_idmap_level;
+
+	NTSTATUS winbind_get_idmap(
+		[in]     winbind_get_idmap_level level,
+		[in]     uint32 count,
+		[in,out] [size_is(count)] id_mapping ids[]
+	);
+
 }
diff --git a/source/ntvfs/posix/pvfs_acl.c b/source/ntvfs/posix/pvfs_acl.c
index 5070f68..2393a2e 100644
--- a/source/ntvfs/posix/pvfs_acl.c
+++ b/source/ntvfs/posix/pvfs_acl.c
@@ -126,6 +126,8 @@ static NTSTATUS pvfs_default_acl(struct pvfs_state *pvfs,
 	NTSTATUS status;
 	struct security_ace ace;
 	mode_t mode;
+	struct id_mapping *ids;
+	struct composite_context *ctx;
 
 	*psd = security_descriptor_initialise(req);
 	if (*psd == NULL) {
@@ -133,15 +135,33 @@ static NTSTATUS pvfs_default_acl(struct pvfs_state *pvfs,
 	}
 	sd = *psd;
 
-	status = sidmap_uid_to_sid(pvfs->sidmap, sd, name->st.st_uid, &sd->owner_sid);
-	if (!NT_STATUS_IS_OK(status)) {
-		return status;
-	}
-	status = sidmap_gid_to_sid(pvfs->sidmap, sd, name->st.st_gid, &sd->group_sid);
-	if (!NT_STATUS_IS_OK(status)) {
-		return status;
-	}
+	ids = talloc_array(sd, struct id_mapping, 2);
+	NT_STATUS_HAVE_NO_MEMORY(ids);
+
+	ids[0].unixid = talloc(ids, struct unixid);
+	NT_STATUS_HAVE_NO_MEMORY(ids[0].unixid);
+
+	ids[0].unixid->id = name->st.st_uid;
+	ids[0].unixid->type = ID_TYPE_UID;
+	ids[0].sid = NULL;
 
+	ids[1].unixid = talloc(ids, struct unixid);
+	NT_STATUS_HAVE_NO_MEMORY(ids[1].unixid);
+
+	ids[1].unixid->id = name->st.st_gid;
+	ids[1].unixid->type = ID_TYPE_GID;
+	ids[1].sid = NULL;
+
+	ctx = wbc_xids_to_sids_send(pvfs->wbc_ctx, ids, 2, ids);
+	NT_STATUS_HAVE_NO_MEMORY(ctx);
+
+	status = wbc_xids_to_sids_recv(ctx, &ids);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list