fix it WRONG -1 just sets the old time? master4-abartlet
authorStefan Metzmacher <metze@samba.org>
Sat, 15 Mar 2014 05:40:00 +0000 (06:40 +0100)
committerStefan Metzmacher <metze@samba.org>
Sun, 29 Jun 2014 21:45:27 +0000 (23:45 +0200)
source4/dsdb/samdb/ldb_modules/password_hash.c

index 7977dab3c112ef0af63b45a3c4d4a0221801fc25..1538454c80ea2e4e2284b63a13328d83b2b4ca54 100644 (file)
@@ -2577,10 +2577,10 @@ static int setup_io(struct ph_context *ac,
         * the lanman hash alone and we've deactivated that mechanism. This
         * would end in an account without any password! */
        if ((!io->n.cleartext_utf8) && (!io->n.cleartext_utf16)
-           && (!io->n.nt_hash) && (!io->n.lm_hash)) {
+           && (!io->n.nt_hash) && (!io->n.lm_hash) && (lm_hash)) {
                ldb_asprintf_errstring(ldb,
                        "setup_io: "
-                       "It' not possible to delete the password (changes using the LAN Manager hash alone could be deactivated)!");
+                       "It's not possible to delete the password (changes using the LAN Manager hash alone could be deactivated)!");
                /* on "userPassword" and "clearTextPassword" we've to return
                 * something different, since these are virtual attributes */
                if ((ldb_msg_find_element(orig_msg, "userPassword") != NULL) ||