diff options
author | Stefan Metzmacher <metze@samba.org> | 2010-05-11 08:38:02 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2010-05-11 08:38:02 +0200 |
commit | ad5b9ae8dc5c410ac3d9a510a82aaef2551efb57 (patch) | |
tree | b68006ea0e458111e25541c7ef74f5bf7580b829 | |
parent | 8ff38004e8d7bd09e435901c315622e8d6af2403 (diff) | |
download | samba-ad5b9ae8dc5c410ac3d9a510a82aaef2551efb57.tar.gz samba-ad5b9ae8dc5c410ac3d9a510a82aaef2551efb57.tar.bz2 samba-ad5b9ae8dc5c410ac3d9a510a82aaef2551efb57.zip |
Revert "s4:password hash LDB module - check that password hashes are != NULL before copying them"
This reverts commit fa87027592f71179c22f132e375038217bc9d36a.
This check is done one level above now.
metze
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/password_hash.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c b/source4/dsdb/samdb/ldb_modules/password_hash.c index c40656ef42..38617b08c5 100644 --- a/source4/dsdb/samdb/ldb_modules/password_hash.c +++ b/source4/dsdb/samdb/ldb_modules/password_hash.c @@ -1781,11 +1781,9 @@ static int setup_io(struct ph_context *ac, return LDB_ERR_CONSTRAINT_VIOLATION; } - 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))); - } + 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 */ @@ -1832,11 +1830,9 @@ static int setup_io(struct ph_context *ac, return LDB_ERR_UNWILLING_TO_PERFORM; } - 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))); - } + 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) */ |