Sophie

Sophie

distrib > Mandriva > 2007.1 > x86_64 > media > main-updates-src > by-pkgid > c645a371606d8de2915127d7f5915ff3 > files > 29

util-linux-2.12r-12.2mdv2007.1.src.rpm

--- util-linux-2.12/login-utils/login.c
+++ util-linux-2.12/login-utils/login.c
@@ -627,16 +627,16 @@ main(int argc, char **argv)
 	    pam_end(pamh, retcode);
 	    exit(0);
 	}
+    }
 
-	retcode = pam_acct_mgmt(pamh, 0);
-
-	if(retcode == PAM_NEW_AUTHTOK_REQD) {
-	    retcode = pam_chauthtok(pamh, PAM_CHANGE_EXPIRED_AUTHTOK);
-	}
+    retcode = pam_acct_mgmt(pamh, 0);
 
-	PAM_FAIL_CHECK;
+    if(retcode == PAM_NEW_AUTHTOK_REQD) {
+        retcode = pam_chauthtok(pamh, PAM_CHANGE_EXPIRED_AUTHTOK);
     }
 
+    PAM_FAIL_CHECK;
+
     /*
      * Grab the user information out of the password file for future usage
      * First get the username that we are actually using, though.