]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Fix kadmin_getpol format string
authorGreg Hudson <ghudson@mit.edu>
Fri, 15 Mar 2013 06:13:22 +0000 (02:13 -0400)
committerGreg Hudson <ghudson@mit.edu>
Fri, 15 Mar 2013 06:13:22 +0000 (02:13 -0400)
Commit 0780e46fc13dbafa177525164997cd204cc50b51 matched a %ld format
string with the integer 0, which is an int rather than a long.  Just
put 0 in the format string instead.  Noted by David Benjamin
<davidben@mit.edu>.

src/kadmin/cli/kadmin.c

index 151f3165a9c07ddc0e18a76b0a67cddf215812af..6f6a8ba4645b90446121250aa04b70ef59552756 100644 (file)
@@ -1731,10 +1731,10 @@ kadmin_getpol(int argc, char *argv[])
             printf(_("Allowed key/salt types: %s\n"), policy.allowed_keysalts);
     } else {
         /* Output 0 where we used to output policy_refcnt. */
-        printf("\"%s\"\t%ld\t%ld\t%ld\t%ld\t%ld\t%ld\t%lu\t%ld\t%ld\t%s\n",
+        printf("\"%s\"\t%ld\t%ld\t%ld\t%ld\t%ld\t0\t%lu\t%ld\t%ld\t%s\n",
                policy.policy, policy.pw_max_life, policy.pw_min_life,
                policy.pw_min_length, policy.pw_min_classes,
-               policy.pw_history_num, 0, (unsigned long)policy.pw_max_fail,
+               policy.pw_history_num, (unsigned long)policy.pw_max_fail,
                (long)policy.pw_failcnt_interval,
                (long)policy.pw_lockout_duration,
                (policy.allowed_keysalts == NULL) ? "-" :