From 1fa0981836eb33dd37061c4f2965525c513e3ca6 Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Fri, 1 Jan 2010 16:41:04 +0000 Subject: [PATCH] Change db_args from being a global to only defined in the function that uses it. This removes a warning of shadowed variable names. Change several functions to static when limited to main.c git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23563 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kdc/extern.h | 1 - src/kdc/main.c | 31 ++++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/kdc/extern.h b/src/kdc/extern.h index af5b3086c..2f5dc0b9c 100644 --- a/src/kdc/extern.h +++ b/src/kdc/extern.h @@ -103,7 +103,6 @@ extern krb5_timestamp kdc_infinity; /* greater than all other timestamps */ extern krb5_rcache kdc_rcache; /* replay cache */ extern krb5_keyblock psr_key; /* key for predicted sam response */ extern const int kdc_modifies_kdb; -extern char **db_args; extern krb5_int32 max_dgram_reply_size; /* maximum datagram size */ extern const int vague_errors; diff --git a/src/kdc/main.c b/src/kdc/main.c index 9fd63756d..9d8022a78 100644 --- a/src/kdc/main.c +++ b/src/kdc/main.c @@ -77,18 +77,18 @@ extern int daemon(int, int); #endif -void usage (char *); +static void usage (char *); -krb5_sigtype request_exit (int); -krb5_sigtype request_hup (int); +static krb5_sigtype request_exit (int); +static krb5_sigtype request_hup (int); -void setup_signal_handlers (void); +static void setup_signal_handlers (void); -krb5_error_code setup_sam (void); +static krb5_error_code setup_sam (void); -void initialize_realms (krb5_context, int, char **); +static void initialize_realms (krb5_context, int, char **); -void finish_realms (void); +static void finish_realms (void); static int nofork = 0; static const char *pid_file = NULL; @@ -504,7 +504,7 @@ whoops: return(kret); } -krb5_sigtype +static krb5_sigtype request_exit(int signo) { signal_requests_exit = 1; @@ -516,7 +516,7 @@ request_exit(int signo) #endif } -krb5_sigtype +static krb5_sigtype request_hup(int signo) { signal_requests_hup = 1; @@ -528,7 +528,7 @@ request_hup(int signo) #endif } -void +static void setup_signal_handlers(void) { #ifdef POSIX_SIGNALS @@ -551,13 +551,13 @@ setup_signal_handlers(void) return; } -krb5_error_code +static krb5_error_code setup_sam(void) { return krb5_c_make_random_key(kdc_context, ENCTYPE_DES_CBC_MD5, &psr_key); } -void +static void usage(char *name) { fprintf(stderr, "usage: %s [-x db_args]* [-d dbpathname] [-r dbrealmname]\n\t\t[-R replaycachename] [-m] [-k masterenctype] [-M masterkeyname]\n\t\t[-p port] [-P pid_file] [/]\n" @@ -567,8 +567,8 @@ usage(char *name) return; } -char **db_args = NULL; -void + +static void initialize_realms(krb5_context kcontext, int argc, char **argv) { int c; @@ -587,6 +587,7 @@ initialize_realms(krb5_context kcontext, int argc, char **argv) char *no_refrls = NULL; char *host_based_srvcs = NULL; int db_args_size = 0; + char **db_args = NULL; extern char *optarg; @@ -822,7 +823,7 @@ write_pid_file(const char *path) return 0; } -void +static void finish_realms() { int i; -- 2.26.2