[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha3-93-g4449ce3

Andrew Tridgell tridge at samba.org
Fri Apr 11 04:14:10 GMT 2008


The branch, v4-0-test has been updated
       via  4449ce381aca25e7f510a2f24b43c3a81e870032 (commit)
      from  a3e1b835656470f1a80f0fa69f53a9df849baee3 (commit)

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


- Log -----------------------------------------------------------------
commit 4449ce381aca25e7f510a2f24b43c3a81e870032
Author: Andrew Tridgell <tridge at samba.org>
Date:   Fri Apr 11 14:12:34 2008 +1000

    Fixed a crash bug in unixuid module on failed ID mapping
    
    We need to intialise *ids regardless of the status of the call, as the
    IDL specifies that the out[] array always exists. If we don't
    initialise out then we get a segv when a id mapping fails.
    
    This still doesn't explain why the idmapping is failing, but at least
    the client now gets NT_STATUS_NONE_MAPPED rather than a crashed
    server.

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

Summary of changes:
 source/winbind/wb_sids2xids.c |   10 ++++------
 source/winbind/wb_xids2sids.c |   10 ++++------
 2 files changed, 8 insertions(+), 12 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/winbind/wb_sids2xids.c b/source/winbind/wb_sids2xids.c
index 302b915..6b89caf 100644
--- a/source/winbind/wb_sids2xids.c
+++ b/source/winbind/wb_sids2xids.c
@@ -67,15 +67,13 @@ NTSTATUS wb_sids2xids_recv(struct composite_context *ctx,
 			   struct id_mapping **ids)
 {
 	NTSTATUS status = composite_wait(ctx);
+	struct sids2xids_state *state =	talloc_get_type(ctx->private_data,
+							struct sids2xids_state);
 
 	DEBUG(5, ("wb_sids2xids_recv called\n"));
 
-	if (NT_STATUS_IS_OK(status)) {
-		struct sids2xids_state *state =
-			talloc_get_type(ctx->private_data,
-				struct sids2xids_state);
-		*ids = state->ids;
-	}
+	*ids = state->ids;
+
 	talloc_free(ctx);
 	return status;
 }
diff --git a/source/winbind/wb_xids2sids.c b/source/winbind/wb_xids2sids.c
index 1be394d..a1cf266 100644
--- a/source/winbind/wb_xids2sids.c
+++ b/source/winbind/wb_xids2sids.c
@@ -67,15 +67,13 @@ NTSTATUS wb_xids2sids_recv(struct composite_context *ctx,
 			   struct id_mapping **ids)
 {
 	NTSTATUS status = composite_wait(ctx);
+	struct xids2sids_state *state =	talloc_get_type(ctx->private_data,
+							struct xids2sids_state);
 
 	DEBUG(5, ("wb_xids2sids_recv called.\n"));
 
-	if (NT_STATUS_IS_OK(status)) {
-		struct xids2sids_state *state =
-			talloc_get_type(ctx->private_data,
-				struct xids2sids_state);
-		*ids = state->ids;
-	}
+	*ids = state->ids;
+
 	talloc_free(ctx);
 	return status;
 }


-- 
Samba Shared Repository


More information about the samba-cvs mailing list