From: Greg Hudson Date: Fri, 15 Mar 2013 06:13:22 +0000 (-0400) Subject: Fix kadmin_getpol format string X-Git-Tag: krb5-1.12-alpha1~267 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ed54bc66d81790ab33c056baf9ad826a646ee94;p=thirdparty%2Fkrb5.git Fix kadmin_getpol format string 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 . --- diff --git a/src/kadmin/cli/kadmin.c b/src/kadmin/cli/kadmin.c index 151f3165a9..6f6a8ba464 100644 --- a/src/kadmin/cli/kadmin.c +++ b/src/kadmin/cli/kadmin.c @@ -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) ? "-" :