summaryrefslogtreecommitdiffstats
path: root/login-utils/chfn.c
diff options
context:
space:
mode:
authorKarel Zak2006-12-07 00:25:35 +0100
committerKarel Zak2006-12-07 00:25:35 +0100
commit2b6fc908bc368b540845a313c3b8a867c5ad9a42 (patch)
tree6fad48a239bc90515a5dc4084d6e3c3ee1f41e29 /login-utils/chfn.c
parentImported from util-linux-2.7.1 tarball. (diff)
downloadkernel-qcow2-util-linux-2b6fc908bc368b540845a313c3b8a867c5ad9a42.tar.gz
kernel-qcow2-util-linux-2b6fc908bc368b540845a313c3b8a867c5ad9a42.tar.xz
kernel-qcow2-util-linux-2b6fc908bc368b540845a313c3b8a867c5ad9a42.zip
Imported from util-linux-2.8 tarball.
Diffstat (limited to 'login-utils/chfn.c')
-rw-r--r--login-utils/chfn.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/login-utils/chfn.c b/login-utils/chfn.c
index e81c5c18b..8e962db05 100644
--- a/login-utils/chfn.c
+++ b/login-utils/chfn.c
@@ -7,8 +7,8 @@
* there is no warranty.
*
* $Author: aebr $
- * $Revision: 1.15 $
- * $Date: 1997/07/06 23:10:41 $
+ * $Revision: 1.18 $
+ * $Date: 1998/06/11 22:30:11 $
*
* Updated Thu Oct 12 09:19:26 1995 by faith@cs.unc.edu with security
* patches from Zefram <A.Main@dcs.warwick.ac.uk>
@@ -21,9 +21,6 @@
*
*/
-static char rcsId[] = "$Version: $Id: chfn.c,v 1.15 1997/07/06 23:10:41 aebr Exp $ $";
-
-#define _XOPEN_SOURCE /* for crypt() */
#define _BSD_SOURCE /* for strcasecmp() */
#include <sys/types.h>
@@ -35,6 +32,7 @@ static char rcsId[] = "$Version: $Id: chfn.c,v 1.15 1997/07/06 23:10:41 aebr Exp
#include <errno.h>
#include <ctype.h>
#include <getopt.h>
+#include "my_crypt.h"
#include "../version.h"
#if REQUIRE_PASSWORD && USE_PAM
@@ -161,7 +159,7 @@ int main (argc, argv)
exit(1);
}
retcode = pam_acct_mgmt(pamh, 0);
- if (retcode == PAM_AUTHTOKEN_REQD) {
+ if (retcode == PAM_NEW_AUTHTOK_REQD) {
retcode = pam_chauthtok(pamh, PAM_CHANGE_EXPIRED_AUTHTOK);
} else if (retcode) {
puts("Password error.");