[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-test-1852-gc9472ae

Volker Lendecke vl at samba.org
Mon Feb 4 18:38:01 GMT 2008


The branch, v3-2-test has been updated
       via  c9472ae61039adf178e047d89dbcc698dfa57059 (commit)
       via  22e49ef2c0c9b641068ac5419b9c82fb97d3e8e6 (commit)
       via  5223d18ea2d891418a0f833f58cc3502cb26ce03 (commit)
      from  86d00328aead337026a1550ee888ee3f646f62b2 (commit)

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


- Log -----------------------------------------------------------------
commit c9472ae61039adf178e047d89dbcc698dfa57059
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Feb 4 19:33:56 2008 +0100

    Fix valgrind errors
    
    We need to keep the names around on the search. Probably a tdb_move would do it
    here as well, but RPC is not the fastest thing on earth anyway...
    
    Thanks to Günther for pointing that out to me!

commit 22e49ef2c0c9b641068ac5419b9c82fb97d3e8e6
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Feb 4 16:50:09 2008 +0100

    tiny simplification

commit 5223d18ea2d891418a0f833f58cc3502cb26ce03
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Feb 2 14:01:26 2008 +0100

    Remove a static
    
    I very much doubt that this is called enough to justify a global. If this turns
    out to be a hot code path, we might reconsider :-)

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

Summary of changes:
 source/auth/auth.c            |    8 +++-----
 source/passdb/passdb.c        |    5 +----
 source/passdb/pdb_smbpasswd.c |   18 +++++++++++++++++-
 3 files changed, 21 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/auth/auth.c b/source/auth/auth.c
index 0a9ae32..e136fc2 100644
--- a/source/auth/auth.c
+++ b/source/auth/auth.c
@@ -508,11 +508,9 @@ NTSTATUS make_auth_context_subsystem(struct auth_context **auth_context)
 		DEBUG(5,("Using specified auth order\n"));
 	}
 	
-	if (!NT_STATUS_IS_OK(nt_status = make_auth_context_text_list(auth_context, auth_method_list))) {
-		str_list_free(&auth_method_list);
-		return nt_status;
-	}
-	
+	nt_status = make_auth_context_text_list(auth_context,
+						auth_method_list);
+
 	str_list_free(&auth_method_list);
 	return nt_status;
 }
diff --git a/source/passdb/passdb.c b/source/passdb/passdb.c
index 4228f6c..b6a4126 100644
--- a/source/passdb/passdb.c
+++ b/source/passdb/passdb.c
@@ -443,10 +443,7 @@ bool pdb_gethexhours(const char *p, unsigned char *hours)
 
 int algorithmic_rid_base(void)
 {
-	static int rid_offset = 0;
-
-	if (rid_offset != 0)
-		return rid_offset;
+	int rid_offset;
 
 	rid_offset = lp_algorithmic_rid_base();
 
diff --git a/source/passdb/pdb_smbpasswd.c b/source/passdb/pdb_smbpasswd.c
index 6cf54fb..70944a9 100644
--- a/source/passdb/pdb_smbpasswd.c
+++ b/source/passdb/pdb_smbpasswd.c
@@ -1559,8 +1559,24 @@ static bool smbpasswd_search_next_entry(struct pdb_search *search,
 		return false;
 	}
 
-	*entry = state->entries[state->current++];
+	entry->idx = state->entries[state->current].idx;
+	entry->rid = state->entries[state->current].rid;
+	entry->acct_flags = state->entries[state->current].acct_flags;
+
+	entry->account_name = talloc_strdup(
+		search->mem_ctx, state->entries[state->current].account_name);
+	entry->fullname = talloc_strdup(
+		search->mem_ctx, state->entries[state->current].fullname);
+	entry->description = talloc_strdup(
+		search->mem_ctx, state->entries[state->current].description);
+
+	if ((entry->account_name == NULL) || (entry->fullname == NULL)
+	    || (entry->description == NULL)) {
+		DEBUG(0, ("talloc_strdup failed\n"));
+		return false;
+	}
 
+	state->current += 1;
 	return true;
 }
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list