r19577: Fix from Nils Nordman for bug #4085. Thanks !
authorJeremy Allison <jra@samba.org>
Mon, 6 Nov 2006 19:21:44 +0000 (19:21 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:15:42 +0000 (12:15 -0500)
Jeremy.
(This used to be commit 3b5ab8ab8296339ad0e62d8564d706b5a446dcf3)

source3/libsmb/passchange.c

index e4008197431af7c2bafd28180ba161429ce6891a..5b4b0896c0f2e35f85beb8d3e45b6dcf74eb1938 100644 (file)
@@ -86,12 +86,13 @@ NTSTATUS remote_password_change(const char *remote_machine, const char *user_nam
 
        if (!NT_STATUS_IS_OK(result)) {
 
-               /* Password must change is the only valid error condition here
-                * from where we can proceed, the rest like account locked out
-                * or logon failure will lead to errors later anyway */
+               /* Password must change or Password expired are the only valid
+                * error conditions here from where we can proceed, the rest like
+                * account locked out or logon failure will lead to errors later
+                * anyway */
 
-               if (!NT_STATUS_EQUAL(result,
-                                    NT_STATUS_PASSWORD_MUST_CHANGE)) {
+               if (!NT_STATUS_EQUAL(result, NT_STATUS_PASSWORD_MUST_CHANGE) &&
+                   !NT_STATUS_EQUAL(result, NT_STATUS_PASSWORD_EXPIRED)) {
                        slprintf(err_str, err_str_len-1, "Could not "
                                 "connect to machine %s: %s\n",
                                 remote_machine, cli_errstr(cli));