[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-30-g62eb817

Volker Lendecke vlendec at samba.org
Sat Jun 20 10:15:40 GMT 2009


The branch, master has been updated
       via  62eb817c06458070d090c1698e9c0a99914c6d78 (commit)
       via  f24e63af2c27fdb68dfe3151eac30960316157c2 (commit)
       via  eb8c081771bd69475f2de67772c1b655a23ff10d (commit)
      from  661f0ba73b28d6165e0ba958413adf9cb97662d5 (commit)

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


- Log -----------------------------------------------------------------
commit 62eb817c06458070d090c1698e9c0a99914c6d78
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Jun 20 11:46:42 2009 +0200

    Fix setting passwords in pdb_ads
    
    The samba4 password_hash module does not allow changing the password fields via
    the "delete oldval" -> "add newval" set of modify operations, it requires a
    single "replace with newval" operation.
    
    Andrew, Samba3 by default uses that delete/add pair to detect if between
    fetching the old value and storing the new one the old value has changed. This
    is lost by using the "replace" operation.
    
    Would it make sense to add this to the password_hash module?
    
    Volker

commit f24e63af2c27fdb68dfe3151eac30960316157c2
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Jun 20 11:06:14 2009 +0200

    Fix empty lines

commit eb8c081771bd69475f2de67772c1b655a23ff10d
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Jun 20 10:54:51 2009 +0200

    talloc_tos() aborts if it can not get a stackframe

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

Summary of changes:
 source3/lib/tldap.c      |    3 ---
 source3/passdb/passdb.c  |    3 ---
 source3/passdb/pdb_ads.c |   13 +++++++------
 3 files changed, 7 insertions(+), 12 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/tldap.c b/source3/lib/tldap.c
index 37caa08..b76e203 100644
--- a/source3/lib/tldap.c
+++ b/source3/lib/tldap.c
@@ -1496,7 +1496,6 @@ struct tevent_req *tldap_add_send(TALLOC_CTX *mem_ctx,
 	}
 	tevent_req_set_callback(subreq, tldap_add_done, req);
 	return req;
-
 }
 
 static void tldap_add_done(struct tevent_req *subreq)
@@ -1593,7 +1592,6 @@ struct tevent_req *tldap_modify_send(TALLOC_CTX *mem_ctx,
 	}
 	tevent_req_set_callback(subreq, tldap_modify_done, req);
 	return req;
-
 }
 
 static void tldap_modify_done(struct tevent_req *subreq)
@@ -1667,7 +1665,6 @@ struct tevent_req *tldap_delete_send(TALLOC_CTX *mem_ctx,
 	}
 	tevent_req_set_callback(subreq, tldap_delete_done, req);
 	return req;
-
 }
 
 static void tldap_delete_done(struct tevent_req *subreq)
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c
index 51190e0..8efd659 100644
--- a/source3/passdb/passdb.c
+++ b/source3/passdb/passdb.c
@@ -655,9 +655,6 @@ NTSTATUS local_password_change(const char *user_name,
 	*pp_msg_str = NULL;
 
 	tosctx = talloc_tos();
-	if (!tosctx) {
-		return NT_STATUS_NO_MEMORY;
-	}
 
 	sam_pass = samu_new(tosctx);
 	if (!sam_pass) {
diff --git a/source3/passdb/pdb_ads.c b/source3/passdb/pdb_ads.c
index 0811082..4bd0b89 100644
--- a/source3/passdb/pdb_ads.c
+++ b/source3/passdb/pdb_ads.c
@@ -258,6 +258,7 @@ static bool pdb_ads_init_ads_from_sam(struct pdb_ads_state *state,
 				      struct samu *sam)
 {
 	bool ret = true;
+	DATA_BLOB blob;
 
 	/* TODO: All fields :-) */
 
@@ -265,13 +266,13 @@ static bool pdb_ads_init_ads_from_sam(struct pdb_ads_state *state,
 		existing, mem_ctx, pnum_mods, pmods, "displayName",
 		"%s", pdb_get_fullname(sam));
 
-	ret &= tldap_make_mod_blob(
-		existing, mem_ctx, pnum_mods, pmods, "unicodePwd",
-		data_blob_const(pdb_get_nt_passwd(sam), NT_HASH_LEN));
+	blob = data_blob_const(pdb_get_nt_passwd(sam), NT_HASH_LEN);
+	ret &= tldap_add_mod_blobs(mem_ctx, pmods, TLDAP_MOD_REPLACE,
+				   "unicodePwd", 1, &blob);
 
-	ret &= tldap_make_mod_blob(
-		existing, mem_ctx, pnum_mods, pmods, "dBCSPwd",
-		data_blob_const(pdb_get_lanman_passwd(sam), NT_HASH_LEN));
+	blob = data_blob_const(pdb_get_lanman_passwd(sam), NT_HASH_LEN);
+	ret &= tldap_add_mod_blobs(mem_ctx, pmods, TLDAP_MOD_REPLACE,
+				   "dBCSPwd", 1, &blob);
 
 	ret &= tldap_make_mod_fmt(
 		existing, mem_ctx, pnum_mods, pmods, "userAccountControl",


-- 
Samba Shared Repository


More information about the samba-cvs mailing list