From 0770707730df526f208600e6508ae39c6479c65e Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Mon, 26 Feb 2001 19:31:03 +0000 Subject: [PATCH] * ktutil.c, ktutil_funcs.c: Do not shadow system "index" and "stime" variables. * ktutil.h: Add prototypes for SS callback functions. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13027 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kadmin/ktutil/ChangeLog | 7 +++++++ src/kadmin/ktutil/ktutil.c | 4 ++-- src/kadmin/ktutil/ktutil.h | 32 ++++++++++++++++++++++++++++++++ src/kadmin/ktutil/ktutil_funcs.c | 11 ++++++----- 4 files changed, 47 insertions(+), 7 deletions(-) diff --git a/src/kadmin/ktutil/ChangeLog b/src/kadmin/ktutil/ChangeLog index 4c6b18c3a..50ba92b6e 100644 --- a/src/kadmin/ktutil/ChangeLog +++ b/src/kadmin/ktutil/ChangeLog @@ -1,3 +1,10 @@ +Mon Feb 26 14:27:24 2001 Ezra Peisach + + * ktutil.c, ktutil_funcs.c: Do not shadow system "index" and + "stime" variables. + + * ktutil.h: Add prototypes for SS callback functions. + 2000-12-15 Ken Raeburn * ktutil.c (ktutil_list): Provide a real usage message. diff --git a/src/kadmin/ktutil/ktutil.c b/src/kadmin/ktutil/ktutil.c index c8eafb66c..b6a241983 100644 --- a/src/kadmin/ktutil/ktutil.c +++ b/src/kadmin/ktutil/ktutil.c @@ -219,7 +219,7 @@ void ktutil_list(argc, argv) { krb5_error_code retval; krb5_kt_list lp; - struct tm *stime; + struct tm *sltime; int show_time = 0, show_keys = 0, show_enctype = 0; int i, j; char *pname; @@ -259,7 +259,7 @@ void ktutil_list(argc, argv) char fmtbuf[18]; char fill; - stime = localtime((time_t *)&lp->entry->timestamp); + sltime = localtime((time_t *)&lp->entry->timestamp); fill = ' '; if (!krb5_timestamp_to_sfstring((krb5_timestamp)lp->entry-> timestamp, diff --git a/src/kadmin/ktutil/ktutil.h b/src/kadmin/ktutil/ktutil.h index ccc1b8649..8d7d63e48 100644 --- a/src/kadmin/ktutil/ktutil.h +++ b/src/kadmin/ktutil/ktutil.h @@ -67,3 +67,35 @@ krb5_error_code ktutil_write_srvtab krb5_kt_list, char *)); #endif + +void ktutil_add_entry + KRB5_PROTOTYPE((int, + char *[])); + +void ktutil_clear_list + KRB5_PROTOTYPE((int, + char *[])); + +void ktutil_read_v5 + KRB5_PROTOTYPE((int, + char *[])); + +void ktutil_read_v4 + KRB5_PROTOTYPE((int, + char *[])); + +void ktutil_write_v5 + KRB5_PROTOTYPE((int, + char *[])); + +void ktutil_write_v4 + KRB5_PROTOTYPE((int, + char *[])); + +void ktutil_delete_entry + KRB5_PROTOTYPE((int, + char *[])); + +void ktutil_list + KRB5_PROTOTYPE((int, + char *[])); diff --git a/src/kadmin/ktutil/ktutil_funcs.c b/src/kadmin/ktutil/ktutil_funcs.c index af4f37bf3..f566e04d1 100644 --- a/src/kadmin/ktutil/ktutil_funcs.c +++ b/src/kadmin/ktutil/ktutil_funcs.c @@ -61,16 +61,16 @@ krb5_error_code ktutil_free_kt_list(context, list) * Delete a numbered entry in a kt_list. Takes a pointer to a kt_list * in case head gets deleted. */ -krb5_error_code ktutil_delete(context, list, index) +krb5_error_code ktutil_delete(context, list, idx) krb5_context context; krb5_kt_list *list; - int index; + int idx; { krb5_kt_list lp, prev; int i; for (lp = *list, i = 1; lp; prev = lp, lp = lp->next, i++) { - if (i == index) { + if (i == idx) { if (i == 1) *list = lp->next; else @@ -109,7 +109,8 @@ krb5_error_code ktutil_add(context, list, princ_str, kvno, char promptstr[1024]; char *cp; - int i, tmp, pwsize = BUFSIZ; + int i, tmp; + unsigned int pwsize = BUFSIZ; retval = krb5_parse_name(context, princ_str, &princ); if (retval) @@ -344,7 +345,7 @@ krb5_error_code ktutil_write_keytab(context, list, name) * including the null terminator. */ -int getstr(fp, s, n) +static int getstr(fp, s, n) FILE *fp; register char *s; int n; -- 2.26.2