From: Ezra Peisach Date: Tue, 26 Sep 2000 22:15:08 +0000 (+0000) Subject: * gss-misc.c: Include for prototype definitions X-Git-Tag: krb5-1.3-alpha1~1877 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f68e1f0fad677a8e909cd3332fff3efab97cb034;p=krb5.git * gss-misc.c: Include for prototype definitions * gss-client.c gss-server.c: Warning cleanups. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12682 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/appl/gss-sample/ChangeLog b/src/appl/gss-sample/ChangeLog index 85d7f7325..b9d413287 100644 --- a/src/appl/gss-sample/ChangeLog +++ b/src/appl/gss-sample/ChangeLog @@ -1,3 +1,9 @@ +Tue Sep 26 18:13:54 2000 Ezra Peisach + + * gss-misc.c: Include for prototype definitions. + + * gss-client.c gss-server.c: Warning cleanups. + 2000-02-11 Tom Yu * README, gss-client.c, gss-misc.c, gss-misc.h, gss-server.c: diff --git a/src/appl/gss-sample/gss-client.c b/src/appl/gss-sample/gss-client.c index 7ad407a7f..88c065e8f 100644 --- a/src/appl/gss-sample/gss-client.c +++ b/src/appl/gss-sample/gss-client.c @@ -47,7 +47,7 @@ static char *rcsid = "$Header$"; static int verbose = 1; -void usage() +static void usage() { fprintf(stderr, "Usage: gss-client [-port port] [-mech mechanism] [-d]\n"); fprintf(stderr, " [-f] [-q] [-ccount count] [-mcount count]\n"); @@ -73,7 +73,7 @@ void usage() * opened and connected. If an error occurs, an error message is * displayed and -1 is returned. */ -int connect_to_server(host, port) +static int connect_to_server(host, port) char *host; u_short port; { @@ -132,8 +132,8 @@ int connect_to_server(host, port) * unsuccessful, the GSS-API error messages are displayed on stderr * and -1 is returned. */ -int client_establish_context(s, service_name, deleg_flag, auth_flag, oid, - gss_context, ret_flags) +static int client_establish_context(s, service_name, deleg_flag, auth_flag, + oid, gss_context, ret_flags) int s; char *service_name; gss_OID oid; @@ -250,11 +250,11 @@ int client_establish_context(s, service_name, deleg_flag, auth_flag, oid, return 0; } -void read_file(file_name, in_buf) +static void read_file(file_name, in_buf) char *file_name; gss_buffer_t in_buf; { - int fd, bytes_in, count; + int fd, count; struct stat stat_buf; if ((fd = open(file_name, O_RDONLY, 0)) < 0) { @@ -321,9 +321,9 @@ void read_file(file_name, in_buf) * reads back a GSS-API signature block for msg from the server, and * verifies it with gss_verify. -1 is returned if any step fails, * otherwise 0 is returned. */ -int call_server(host, port, oid, service_name, deleg_flag, auth_flag, - wrap_flag, encrypt_flag, mic_flag, msg, use_file, - mcount) +static int call_server(host, port, oid, service_name, deleg_flag, auth_flag, + wrap_flag, encrypt_flag, mic_flag, msg, use_file, + mcount) char *host; u_short port; gss_OID oid; diff --git a/src/appl/gss-sample/gss-misc.c b/src/appl/gss-sample/gss-misc.c index d2b6cab86..9af6db477 100644 --- a/src/appl/gss-sample/gss-misc.c +++ b/src/appl/gss-sample/gss-misc.c @@ -31,6 +31,7 @@ static char *rcsid = "$Header$"; #else #include #include +#include #endif #include #ifdef HAVE_UNISTD_H diff --git a/src/appl/gss-sample/gss-server.c b/src/appl/gss-sample/gss-server.c index 8d2ca27ac..cbd0a8f96 100644 --- a/src/appl/gss-sample/gss-server.c +++ b/src/appl/gss-sample/gss-server.c @@ -49,7 +49,7 @@ static char *rcsid = "$Header$"; #include #endif -void usage() +static void usage() { fprintf(stderr, "Usage: gss-server [-port port] [-verbose] [-once]\n"); fprintf(stderr, " [-inetd] [-export] [-logfile file] [service_name]\n"); @@ -79,7 +79,7 @@ int verbose = 0; * fails, an error message is displayed and -1 is returned; otherwise, * 0 is returned. */ -int server_acquire_creds(service_name, server_creds) +static int server_acquire_creds(service_name, server_creds) char *service_name; gss_cred_id_t *server_creds; { @@ -132,7 +132,8 @@ int server_acquire_creds(service_name, server_creds) * in client_name and 0 is returned. If unsuccessful, an error * message is displayed and -1 is returned. */ -int server_establish_context(s, server_creds, context, client_name, ret_flags) +static int server_establish_context(s, server_creds, context, client_name, + ret_flags) int s; gss_cred_id_t server_creds; gss_ctx_id_t *context; @@ -268,7 +269,7 @@ int server_establish_context(s, server_creds, context, client_name, ret_flags) * A listening socket on the specified port and created and returned. * On error, an error message is displayed and -1 is returned. */ -int create_socket(port) +static int create_socket(port) u_short port; { struct sockaddr_in saddr; @@ -310,7 +311,7 @@ static float timeval_subtract(tv1, tv2) * DO NOT REMOVE THIS UNTIL A BETTER TEST HAS BEEN WRITTEN, THOUGH. * -TYT */ -int test_import_export_context(context) +static int test_import_export_context(context) gss_ctx_id_t *context; { OM_uint32 min_stat, maj_stat; @@ -378,7 +379,7 @@ int test_import_export_context(context) * * If any error occurs, -1 is returned. */ -int sign_server(s, server_creds, export) +static int sign_server(s, server_creds, export) int s; gss_cred_id_t server_creds; int export; @@ -458,7 +459,8 @@ int sign_server(s, server_creds, export) cp = msg_buf.value; if ((isprint(cp[0]) || isspace(cp[0])) && (isprint(cp[1]) || isspace(cp[1]))) { - fprintf(log, "\"%.*s\"\n", msg_buf.length, msg_buf.value); + fprintf(log, "\"%.*s\"\n", (int) msg_buf.length, + (char *) msg_buf.value); } else { fprintf(log, "\n"); print_token(&msg_buf);