password_hash: simplify the logic if we have cleartext we always generate the hashes
authorStefan Metzmacher <metze@samba.org>
Tue, 22 Jul 2008 16:32:49 +0000 (18:32 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 23 Jul 2008 12:46:09 +0000 (14:46 +0200)
metze
(This used to be commit 5edff84429ef0d03b47a438e18861d26c97e17b6)

source4/dsdb/samdb/ldb_modules/password_hash.c

index 5bbae2c164f6f4739b26fc4bf56e7c1420561c14..8dd4e1e76b650fd27bd6005f648b21daaba6c5dc 100644 (file)
@@ -1071,7 +1071,7 @@ static int setup_password_fields(struct setup_password_fields_io *io)
                return LDB_ERR_UNWILLING_TO_PERFORM;
        }
 
-       if (io->n.cleartext && !io->n.nt_hash) {
+       if (io->n.cleartext) {
                struct samr_Password *hash;
 
                hash = talloc(io->ac, struct samr_Password);
@@ -1092,7 +1092,7 @@ static int setup_password_fields(struct setup_password_fields_io *io)
                }
        }
 
-       if (io->n.cleartext && !io->n.lm_hash) {
+       if (io->n.cleartext) {
                struct samr_Password *hash;
 
                hash = talloc(io->ac, struct samr_Password);