+Tue Sep 26 18:13:54 2000 Ezra Peisach <epeisach@mit.edu>
+
+ * gss-misc.c: Include <sys/socket.h> for prototype definitions.
+
+ * gss-client.c gss-server.c: Warning cleanups.
+
2000-02-11 Tom Yu <tlyu@mit.edu>
* README, gss-client.c, gss-misc.c, gss-misc.h, gss-server.c:
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");
* 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;
{
* 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;
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) {
* 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;
#else
#include <sys/types.h>
#include <netinet/in.h>
+#include <sys/socket.h>
#endif
#include <errno.h>
#ifdef HAVE_UNISTD_H
#include <strings.h>
#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");
* 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;
{
* 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;
* 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;
* 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;
*
* 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;
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);