]> eyrie.org Git - kerberos/kadmin-remctl.git/commitdiff
Increase timeout on kpasswd initial authentication
authorRuss Allbery <rra@stanford.edu>
Tue, 16 Jul 2013 23:59:21 +0000 (16:59 -0700)
committerRuss Allbery <rra@stanford.edu>
Wed, 17 Jul 2013 00:00:18 +0000 (17:00 -0700)
Increase the timeout for initial authentication during a kpasswd
password change to ten seconds.  The previous timeout of two seconds
was occasionally too short in production.  Also fix a Perl warning if
the initial authentication times out.

NEWS
kadmin-backend
kadmin-backend-heim

diff --git a/NEWS b/NEWS
index 989d7a747e0320404b2fb6e99d82f6df7dda4095..aa8845131da39b7e19fe9f0f4440dcfdb237eaf9 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,12 @@
                     User-Visible kadmin-remctl Changes
 
+kadmin-remctl 3.5 (unreleased)
+
+    Increase the timeout for initial authentication during a kpasswd
+    password change to ten seconds.  The previous timeout of two seconds
+    was occasionally too short in production.  Also fix a Perl warning if
+    the initial authentication times out.
+
 kadmin-remctl 3.4 (2013-07-09)
 
     Set the disallow-svr flag on all newly-created principals.  This
index 3d5e3b3e4c1e8d8bfa6b6c639bfd6d7877883ba7..9d2678a7b68ba8560ecab80a46752b5e4c62e1d4 100755 (executable)
@@ -570,8 +570,8 @@ sub kpasswd {
     }
     $kpasswd->send ($old . "\n");
     my ($num, $error, $match, $before, $after)
-        = $kpasswd->expect (2, 'kpasswd: ', 'Enter new password: ');
-    if ($num == 1) {
+        = $kpasswd->expect (10, 'kpasswd: ', 'Enter new password: ');
+    if (defined ($num) && $num == 1) {
         $after =~ s/\r?\n.*//s;
         warn "error: $after\n";
         print "retstr: $after\n";
index 0e6c1cb5377926c5678e6e9bf4a0eacaa09d5af7..9de5b2a29dde0dc34b4052d766c62302e38d8677 100755 (executable)
@@ -548,10 +548,10 @@ sub kpasswd {
     $kpasswd->send ($old . "\n");
 
     my ($num, $error, $match, $before, $after)
-        = $kpasswd->expect (2, 'kpasswd: krb5_get_init_creds:',
+        = $kpasswd->expect (10, 'kpasswd: krb5_get_init_creds:',
                             'kpasswd: Password incorrect',
                             '-re', 'New password for \S+:');
-    if ($num == 1 || $num == 2) {
+    if (defined ($num) && ($num == 1 || $num == 2)) {
         if ($num == 1) {
             $after =~ s/\r?\n.*//s;
             $after =~ s/^\s+//;