From 853975fe9bf83ac6d9c624625d45cc667dc20739 Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Tue, 3 Oct 2000 14:46:35 +0000 Subject: [PATCH] * kadmin.c (kadmin_getpol): Change format strings from %d to %ld to match the policy types which are longs. * getdate.y: Include stdlib.h if present on system. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12704 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kadmin/cli/ChangeLog | 7 +++++++ src/kadmin/cli/getdate.y | 6 +++++- src/kadmin/cli/kadmin.c | 18 +++++++----------- 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/src/kadmin/cli/ChangeLog b/src/kadmin/cli/ChangeLog index a36fe868d..d5d16ef8a 100644 --- a/src/kadmin/cli/ChangeLog +++ b/src/kadmin/cli/ChangeLog @@ -1,3 +1,10 @@ +2000-10-03 Ezra Peisach + + * kadmin.c (kadmin_getpol): Change format strings from %d to %ld + to match the policy types which are longs. + + * getdate.y: Include stdlib.h if present on system. + 2000-07-03 Ezra Peisach * ss_wrapper.c (main): ss_listen() takes only one argument diff --git a/src/kadmin/cli/getdate.y b/src/kadmin/cli/getdate.y index 321603f9f..6de1f7e2a 100644 --- a/src/kadmin/cli/getdate.y +++ b/src/kadmin/cli/getdate.y @@ -55,6 +55,10 @@ void *alloca (); #include #include +#if defined(HAVE_STDLIB_H) +#include +#endif + /* The code at the top of get_date which figures out the offset of the current time zone checks various CPP symbols to see if special tricks are need, but defaults to using the gettimeofday system call. @@ -118,7 +122,7 @@ extern struct tm *localtime(); static int yylex (); static int yyerror (); -#if !defined(lint) && !defined(SABER) +#if !defined(lint) && !defined(SABER) && !defined(_LINT) static char RCS[] = "$Header$"; #endif /* !defined(lint) && !defined(SABER) */ diff --git a/src/kadmin/cli/kadmin.c b/src/kadmin/cli/kadmin.c index 2b1d8ac93..c7a001d63 100644 --- a/src/kadmin/cli/kadmin.c +++ b/src/kadmin/cli/kadmin.c @@ -449,9 +449,6 @@ char *kadmin_startup(argc, argv) int quit() { - krb5_ccache cc; - int retval; - kadm5_destroy(handle); if (ccache_name != NULL) { fprintf(stderr, @@ -1251,7 +1248,6 @@ int kadmin_parse_policy_args(argc, argv, policy, mask, caller) int i; time_t now; time_t date; - krb5_error_code retval; time(&now); *mask = 0; @@ -1430,15 +1426,15 @@ void kadmin_getpol(argc, argv) } if (argc == 2) { printf("Policy: %s\n", policy.policy); - printf("Maximum password life: %d\n", policy.pw_max_life); - printf("Minimum password life: %d\n", policy.pw_min_life); - printf("Minimum password length: %d\n", policy.pw_min_length); - printf("Minimum number of password character classes: %d\n", + printf("Maximum password life: %ld\n", policy.pw_max_life); + printf("Minimum password life: %ld\n", policy.pw_min_life); + printf("Minimum password length: %ld\n", policy.pw_min_length); + printf("Minimum number of password character classes: %ld\n", policy.pw_min_classes); - printf("Number of old keys kept: %d\n", policy.pw_history_num); - printf("Reference count: %d\n", policy.policy_refcnt); + printf("Number of old keys kept: %ld\n", policy.pw_history_num); + printf("Reference count: %ld\n", policy.policy_refcnt); } else { - printf("\"%s\"\t%d\t%d\t%d\t%d\t%d\t%d\n", + printf("\"%s\"\t%ld\t%ld\t%ld\t%ld\t%ld\t%ld\n", policy.policy, policy.pw_max_life, policy.pw_min_life, policy.pw_min_length, policy.pw_min_classes, policy.pw_history_num, policy.policy_refcnt); -- 2.26.2