Skip to content

Commit

Permalink
Fix kadmin_getpol format string
Browse files Browse the repository at this point in the history
Commit 0780e46 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>.
  • Loading branch information
greghudson committed Mar 15, 2013
1 parent 18796a2 commit 7ed54bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/kadmin/cli/kadmin.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) ? "-" :
Expand Down

0 comments on commit 7ed54bc

Please sign in to comment.