]> eyrie.org Git - kerberos/heimdal-kadm5.git/commitdiff
Improved dump() attributes and added KRB5_KDB_PWCHANGE_SERVICE
authorJon Robertson <jonrober@stanford.edu>
Thu, 28 Jan 2010 17:49:10 +0000 (09:49 -0800)
committerJon Robertson <jonrober@stanford.edu>
Fri, 5 Feb 2010 22:31:07 +0000 (14:31 -0800)
Added an interface to return the KRB5_KDB_PWCHANGE_SERVICE constant
value.  This was already listed in the exportable functions, but wasn't
defined.  Also improved the dump printing of all attributes to give an
output more similar to the kadmin get command by converting the constant
name to the text descriptio as seen in get.

Kadm5.pm
consts.h

index d8b8fe2d2c6bae9b99ab158c4eb2962019be247e..6adcd710598d75a77578f52a7b9fabdff84a6c36 100644 (file)
--- a/Kadm5.pm
+++ b/Kadm5.pm
@@ -571,9 +571,15 @@ sub getAttributeNames
                    'KRB5_KDB_SUPPORT_DESMD5',
        );
 
-    foreach my $test (@possible) {
-       push (@attrs, $test) if $bitmask & &{"Heimdal::Kadm5::$test"}();
-    }
+    foreach my $test (@possible) 
+      {
+        if ($bitmask & &{"Heimdal::Kadm5::$test"}()) {
+            my $cleaned = lc ($test);
+            $cleaned =~ s#^krb5_kdb_##;
+            $cleaned =~ s#_#-#g;
+            push (@attrs, $cleaned);
+        }
+      }
     return @attrs;
   }
 
index 0943099a344fd479a33cc353db6f95d2b1b4d677..72edd264f9d27eb2f23104bbb3c7a043976f506c 100644 (file)
--- a/consts.h
+++ b/consts.h
@@ -454,6 +454,12 @@ constant(char *name, int arg)
            goto not_there;
 #endif
 
+       if (strEQ(name, "KRB5_KDB_PWCHANGE_SERVICE"))
+#ifdef KRB5_KDB_PWCHANGE_SERVICE
+           return KRB5_KDB_PWCHANGE_SERVICE;
+#else
+           goto not_there;
+#endif
        if (strEQ(name, "KRB5_KDB_REQUIRES_HW_AUTH"))
 #ifdef KRB5_KDB_REQUIRES_HW_AUTH
            return KRB5_KDB_REQUIRES_HW_AUTH;