summaryrefslogtreecommitdiffstats
path: root/login-utils/chsh.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/chsh.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/chsh.c')
-rw-r--r--login-utils/chsh.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/login-utils/chsh.c b/login-utils/chsh.c
index 3cafc966b..f64cd0b78 100644
--- a/login-utils/chsh.c
+++ b/login-utils/chsh.c
@@ -7,8 +7,8 @@
* there is no warranty.
*
* $Author: aebr $
- * $Revision: 1.16 $
- * $Date: 1997/07/06 00:12:08 $
+ * $Revision: 1.19 $
+ * $Date: 1998/06/11 22:30:14 $
*
* Updated Thu Oct 12 09:33:15 1995 by faith@cs.unc.edu with security
* patches from Zefram <A.Main@dcs.warwick.ac.uk>
@@ -24,9 +24,6 @@
*
*/
-static char rcsId[] = "$Version: $Id: chsh.c,v 1.16 1997/07/06 00:12:08 aebr Exp $ $";
-
-#define _XOPEN_SOURCE /* to get definition of crypt() */
#if 0
#define _POSIX_SOURCE 1
#endif
@@ -40,6 +37,7 @@ static char rcsId[] = "$Version: $Id: chsh.c,v 1.16 1997/07/06 00:12:08 aebr Exp
#include <errno.h>
#include <ctype.h>
#include <getopt.h>
+#include "my_crypt.h"
#include "../version.h"
#if REQUIRE_PASSWORD && USE_PAM
@@ -156,7 +154,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.");