]> eyrie.org Git - kerberos/kadmin-remctl.git/commitdiff
Increase kpasswd timeouts and fix Perl warnings
authorRuss Allbery <rra@stanford.edu>
Tue, 13 Aug 2013 22:22:19 +0000 (15:22 -0700)
committerRuss Allbery <rra@stanford.edu>
Tue, 13 Aug 2013 22:22:19 +0000 (15:22 -0700)
Also increase the timeout after doing the password change from 30
seconds to 60 seconds to reflect delays that we've seen in production.
Fix another Perl warning if the password change times out.

NEWS
kadmin-backend
kadmin-backend-heim

diff --git a/NEWS b/NEWS
index 37b4caeb1f248f3b7655d5a31a6df668c525995c..b8e0103a9abdbdd797c52422addd5585ed3f1ae8 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,9 +3,11 @@
 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.
+    password change to ten seconds, and the timeout for a successful
+    password change to sixty seconds.  The previous timeouts of two
+    seconds and thirty seconds was occasionally too short in production.
+    Also fix Perl warnings if the initial authentication or password
+    change time out.
 
     In the Heimdal backend, use get instead of list to check whether a
     given principal already exists.  list requires a complete database
index 9d2678a7b68ba8560ecab80a46752b5e4c62e1d4..37094be2e2803d4ea431234df962b17e8db23cf0 100755 (executable)
@@ -585,9 +585,9 @@ sub kpasswd {
     }
     $kpasswd->send ($new . "\n");
     ($num, $error, $match, $before, $after)
-        = $kpasswd->expect (30, 'Password change rejected: ',
+        = $kpasswd->expect (60, 'Password change rejected: ',
                             'Password changed.');
-    if ($num == 1) {
+    if (defined ($num) && $num == 1) {
         $after =~ s/\..*//s;
         $after =~ s/\r?\n/ /g;
         $after =~ s/\s+See the kpasswd man page.*//s;
index 7ca0fb1ee48eef6040cc13de0f2f26bfeec101b6..bc83c6d59bc4de72baf2bdaef6a7cac8658348bd 100755 (executable)
@@ -551,7 +551,7 @@ sub kpasswd {
         = $kpasswd->expect (10, 'kpasswd: krb5_get_init_creds:',
                             'kpasswd: Password incorrect',
                             '-re', 'New password for \S+:');
-    if (defined ($num) && ($num == 1 || $num == 2)) {
+    if (defined($num) && ($num == 1 || $num == 2)) {
         if ($num == 1) {
             $after =~ s/\r?\n.*//s;
             $after =~ s/^\s+//;
@@ -577,9 +577,9 @@ sub kpasswd {
     }
     $kpasswd->send ($new . "\n");
     ($num, $error, $match, $before, $after)
-        = $kpasswd->expect (30, 'Soft error : ',
+        = $kpasswd->expect (60, 'Soft error : ',
                             'Success : Password changed');
-    if ($num == 1) {
+    if (defined($num) && $num == 1) {
         $after =~ s/\..*//s;
         $after =~ s/\r?\n/ /g;
         $after =~ s/\s+See the kpasswd man page.*//s;