credentials: Allow the secrets.tdb password to be newer than the secrets.ldb password
authorAndrew Bartlett <abartlet@samba.org>
Mon, 22 Sep 2014 23:43:18 +0000 (16:43 -0700)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 26 Sep 2014 23:35:37 +0000 (01:35 +0200)
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
auth/credentials/credentials_secrets.c

index 9fad104bdb8afc2c8a02a178939dc10c6b99ab31..625ce2028388d7b389474fe85b91189ec828a0a7 100644 (file)
@@ -322,6 +322,8 @@ _PUBLIC_ NTSTATUS cli_credentials_set_machine_account(struct cli_credentials *cr
                cli_credentials_set_old_password(cred, secrets_tdb_old_password, CRED_SPECIFIED);
                cli_credentials_set_domain(cred, domain, CRED_SPECIFIED);
                cli_credentials_set_username(cred, machine_account, CRED_SPECIFIED);
+               cli_credentials_set_password_last_changed_time(cred, secrets_tdb_lct);
+               status = NT_STATUS_OK;
        } else if (!NT_STATUS_IS_OK(status)) {
                if (db_ctx) {
                        error_string = talloc_asprintf(cred,