[SCM] Samba Shared Repository - branch master updated
Michael Adam
obnox at samba.org
Thu Jan 7 03:40:21 MST 2010
The branch, master has been updated
via 2fad148... s3:pdb_set_pw_history: free the old history before setting the new.
via 71e3de6... s3:pdb_ldap:init_sam_from_ldap: untangle an assignment from the check
from 71a40d7... s4/torture: fix small bug in lock test
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 2fad148b271fe8623299af551d3ae103d85c5d5f
Author: Michael Adam <obnox at samba.org>
Date: Tue Jan 5 17:24:17 2010 +0100
s3:pdb_set_pw_history: free the old history before setting the new.
This is not strictly necessary, since this only leaks into the
struct samu, and this is not so long-lived in the code path that
changes the password, but it definitely correct and does not harm.
Michael
commit 71e3de6c9fa50ce0035092da6b1a27017ee1bb56
Author: Michael Adam <obnox at samba.org>
Date: Tue Jan 5 18:22:25 2010 +0100
s3:pdb_ldap:init_sam_from_ldap: untangle an assignment from the check
to enhance readability and denbuggability.
Michael
-----------------------------------------------------------------------
Summary of changes:
source3/passdb/pdb_get_set.c | 1 +
source3/passdb/pdb_ldap.c | 6 +++---
2 files changed, 4 insertions(+), 3 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/passdb/pdb_get_set.c b/source3/passdb/pdb_get_set.c
index 30775e4..da65440 100644
--- a/source3/passdb/pdb_get_set.c
+++ b/source3/passdb/pdb_get_set.c
@@ -876,6 +876,7 @@ bool pdb_set_lanman_passwd(struct samu *sampass, const uint8 pwd[LM_HASH_LEN], e
bool pdb_set_pw_history(struct samu *sampass, const uint8 *pwd, uint32 historyLen, enum pdb_value_state flag)
{
if (historyLen && pwd){
+ data_blob_free(&(sampass->nt_pw_his));
sampass->nt_pw_his = data_blob_talloc(sampass,
pwd, historyLen*PW_HISTORY_ENTRY_LEN);
if (!sampass->nt_pw_his.length) {
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index 90ac8e5..1ab21e1 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -915,9 +915,9 @@ static bool init_sam_from_ldap(struct ldapsam_privates *ldap_state,
pwHistLen = MIN(pwHistLen, MAX_PW_HISTORY_LEN);
- if ((pwhist = TALLOC_ARRAY(ctx, uint8,
- pwHistLen * PW_HISTORY_ENTRY_LEN)) ==
- NULL){
+ pwhist = TALLOC_ARRAY(ctx, uint8,
+ pwHistLen * PW_HISTORY_ENTRY_LEN);
+ if (pwhist == NULL) {
DEBUG(0, ("init_sam_from_ldap: talloc failed!\n"));
goto fn_exit;
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list