]> eyrie.org Git - kerberos/kadmin-remctl.git/commitdiff
kadmin-backend: Fixed expiration time output
authorJon Robertson <jonrober@stanford.edu>
Fri, 11 Jun 2010 07:28:19 +0000 (00:28 -0700)
committerJon Robertson <jonrober@stanford.edu>
Fri, 11 Jun 2010 07:30:35 +0000 (00:30 -0700)
When expiration time was not set but password expiration time was, and
the soonest time of the two was requested, nothing was returned.  Fixed
this to return the password expiration time.

kadmin-backend
kadmin-backend-heim

index be0aac9b57feccac1b7dfe1edbad093ecf163b3a..002c9c44a041bf17b7daf78b5ca71ac5201a2e5d 100755 (executable)
@@ -447,7 +447,7 @@ sub kadmin_expiration_check {
     # If no type was requested, return the soonest of the two dates.
     if (!$type) {
         $type = 'expire';
-        $type = 'pwexpire' if $pwexpire > $expire;
+        $type = 'pwexpire' if $pwexpire < $expire || $expire == 0;
     }
 
     if ($type eq 'pwexpire' && $pwexpire > 0) {
index 6ee17e60fa65a3f0a450ca4f0dd4021b4009c5cf..0d8bbed6fb356ed17bb39ec7cd8750a8bd340f0c 100755 (executable)
@@ -407,7 +407,7 @@ sub kadmin_expiration_check {
     # If no type was requested, return the soonest of the two dates.
     if (!$type) {
         $type = 'expire';
-        $type = 'pwexpire' if $pwexpire < $expire;
+        $type = 'pwexpire' if $pwexpire < $expire || $expire == 0;
     }
 
     if ($type eq 'pwexpire' && $pwexpire) {