[SCM] Samba Shared Repository - branch master updated

Matthias Dieter Wallnöfer mdw at samba.org
Mon May 10 12:07:01 MDT 2010


The branch, master has been updated
       via  4f25bae... s4:password_hash LDB module - quiet a warning
       via  fa87027... s4:password hash LDB module - check that password hashes are != NULL before copying them
       via  6276343... s4:password_hash LDB module - don't break the provision
      from  6131caa... s4:passwords.py - add a python unittest for additional testing of my passwords work

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


- Log -----------------------------------------------------------------
commit 4f25baecc14f977711ea5e3ddc226113e387fba3
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date:   Mon May 10 20:04:37 2010 +0200

    s4:password_hash LDB module - quiet a warning

commit fa87027592f71179c22f132e375038217bc9d36a
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date:   Mon May 10 20:02:21 2010 +0200

    s4:password hash LDB module - check that password hashes are != NULL before copying them

commit 6276343ce1b7dd7d217e5a419c09f209f5f87379
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date:   Mon May 10 19:51:31 2010 +0200

    s4:password_hash LDB module - don't break the provision
    
    This is to don't break the provision process at the moment. We need to find
    a better solution.

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

Summary of changes:
 source4/dsdb/samdb/ldb_modules/password_hash.c |   21 ++++++++++++++-------
 1 files changed, 14 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c b/source4/dsdb/samdb/ldb_modules/password_hash.c
index 08aa545..a1ffdc0 100644
--- a/source4/dsdb/samdb/ldb_modules/password_hash.c
+++ b/source4/dsdb/samdb/ldb_modules/password_hash.c
@@ -1672,6 +1672,9 @@ static int setup_io(struct ph_context *ac,
 		return LDB_ERR_CONSTRAINT_VIOLATION;
 	}
 
+	/* FIXME: fix to don't break provision */
+	io->ac->hash_values = true;
+
 	/* Only non-trust accounts have restrictions (possibly this test is the
 	 * wrong way around, but we like to be restrictive if possible */
 	io->u.restrictions = !(io->u.userAccountControl
@@ -1775,9 +1778,11 @@ static int setup_io(struct ph_context *ac,
 			return LDB_ERR_CONSTRAINT_VIOLATION;
 		}
 
-		io->n.nt_hash = talloc(io->ac, struct samr_Password);
-		memcpy(io->n.nt_hash->hash, quoted_utf16->data,
-		       MIN(quoted_utf16->length, sizeof(io->n.nt_hash->hash)));
+		if (quoted_utf16 != NULL) {
+			io->n.nt_hash = talloc(io->ac, struct samr_Password);
+			memcpy(io->n.nt_hash->hash, quoted_utf16->data,
+			       MIN(quoted_utf16->length, sizeof(io->n.nt_hash->hash)));
+		}
 	}
 
 	/* Checks and converts the previous "unicodePwd" attribute */
@@ -1824,9 +1829,11 @@ static int setup_io(struct ph_context *ac,
 			return LDB_ERR_UNWILLING_TO_PERFORM;
 		}
 
-		io->og.nt_hash = talloc(io->ac, struct samr_Password);
-		memcpy(io->og.nt_hash->hash, old_quoted_utf16->data,
-		       MIN(old_quoted_utf16->length, sizeof(io->og.nt_hash->hash)));
+		if (old_quoted_utf16 != NULL) {
+			io->og.nt_hash = talloc(io->ac, struct samr_Password);
+			memcpy(io->og.nt_hash->hash, old_quoted_utf16->data,
+			       MIN(old_quoted_utf16->length, sizeof(io->og.nt_hash->hash)));
+		}
 	}
 
 	/* Handles the "dBCSPwd" attribute (LM hash) */
@@ -2683,7 +2690,7 @@ static int password_hash_mod_do_mod(struct ph_context *ac)
 	/* Get the old password from the database */
 	status = samdb_result_passwords(io.ac,
 					ldb_get_opaque(ldb, "loadparm"),
-					searched_msg,
+					discard_const_p(struct ldb_message, searched_msg),
 					&io.o.lm_hash, &io.o.nt_hash);
 	if (!NT_STATUS_IS_OK(status)) {
 		return LDB_ERR_OPERATIONS_ERROR;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list