summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2001-03-21 13:01:35 +1100
committerDamien Miller <djm@mindrot.org>2001-03-21 13:01:35 +1100
commitec7e1b1d0fa042c7670122b6eb5cb59b14491fca (patch)
treed80a529d0a626353fca94b16da0cd6e20d4c0528
parent2e9adb27e9f36599f160c5dd0b426d95b52237e0 (diff)
- (djm) Don't loop forever when changing password via PAM. Patch
from Solar Designer <solar@openwall.com>
-rw-r--r--ChangeLog4
-rw-r--r--auth-pam.c14
2 files changed, 8 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 9e05e2fec..57b999ef3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,8 @@
3 VanDevender <stevev@darkwing.uoregon.edu> 3 VanDevender <stevev@darkwing.uoregon.edu>
4 - (djm) Make sure pam_retval is initialised on call to pam_end. Patch 4 - (djm) Make sure pam_retval is initialised on call to pam_end. Patch
5 from Solar Designer <solar@openwall.com> 5 from Solar Designer <solar@openwall.com>
6 - (djm) Don't loop forever when changing password via PAM. Patch
7 from Solar Designer <solar@openwall.com>
6 8
720010320 920010320
8 - (bal) glob.c update to added GLOB_LIMITS (OpenBSD CVS). 10 - (bal) glob.c update to added GLOB_LIMITS (OpenBSD CVS).
@@ -4651,4 +4653,4 @@
4651 - Wrote replacements for strlcpy and mkdtemp 4653 - Wrote replacements for strlcpy and mkdtemp
4652 - Released 1.0pre1 4654 - Released 1.0pre1
4653 4655
4654$Id: ChangeLog,v 1.995 2001/03/21 01:16:24 djm Exp $ 4656$Id: ChangeLog,v 1.996 2001/03/21 02:01:35 djm Exp $
diff --git a/auth-pam.c b/auth-pam.c
index dfaaacdc7..2ea29964d 100644
--- a/auth-pam.c
+++ b/auth-pam.c
@@ -33,7 +33,7 @@
33#include "canohost.h" 33#include "canohost.h"
34#include "readpass.h" 34#include "readpass.h"
35 35
36RCSID("$Id: auth-pam.c,v 1.32 2001/03/21 01:16:25 djm Exp $"); 36RCSID("$Id: auth-pam.c,v 1.33 2001/03/21 02:01:35 djm Exp $");
37 37
38#define NEW_AUTHTOK_MSG \ 38#define NEW_AUTHTOK_MSG \
39 "Warning: Your password has expired, please change it now" 39 "Warning: Your password has expired, please change it now"
@@ -326,14 +326,10 @@ void do_pam_chauthtok(void)
326 326
327 if (password_change_required) { 327 if (password_change_required) {
328 pamstate = OTHER; 328 pamstate = OTHER;
329 /* XXX: should we really loop forever? */ 329 pam_retval = pam_chauthtok(__pamh, PAM_CHANGE_EXPIRED_AUTHTOK);
330 do { 330 if (pam_retval != PAM_SUCCESS)
331 pam_retval = pam_chauthtok(__pamh, 331 fatal("PAM pam_chauthtok failed[%d]: %.200s",
332 PAM_CHANGE_EXPIRED_AUTHTOK); 332 pam_retval, PAM_STRERROR(__pamh, pam_retval));
333 if (pam_retval != PAM_SUCCESS)
334 log("PAM pam_chauthtok failed[%d]: %.200s",
335 pam_retval, PAM_STRERROR(__pamh, pam_retval));
336 } while (pam_retval != PAM_SUCCESS);
337 } 333 }
338} 334}
339 335