From ce4580187348b876d5c8ad46118c4c7a7feed923 Mon Sep 17 00:00:00 2001 From: Martin Baulig Date: Fri, 19 Feb 1999 11:02:32 +0000 Subject: [PATCH] Make it work with Digital Unix native cc. --- src/daemon/gnuserv.c | 7 ++++--- src/daemon/server_config.h | 4 ++-- src/daemon/server_config.h.in | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/daemon/gnuserv.c b/src/daemon/gnuserv.c index ffef7180..7df0a7ef 100644 --- a/src/daemon/gnuserv.c +++ b/src/daemon/gnuserv.c @@ -62,9 +62,8 @@ char *program_invocation_short_name; char *program_invocation_name; #endif -extern void handle_parent_connection __P ((int)); -extern void handle_slave_connection __P ((int, int)); -extern void handle_ipc_connection __P ((int)); +void handle_parent_connection (int s); +void handle_slave_connection (int input, int output); #if !defined(INTERNET_DOMAIN_SOCKETS) #error "Internet Domain sockets are required" @@ -244,6 +243,8 @@ permitted (u_long host_addr, int fd) if (enable_debug) syslog_message (LOG_DEBUG, "Trying %lx - %lx", host_addr, permitted_hosts [i]); + if (permitted_hosts [i] == NULL) + return (FALSE); if (host_addr == permitted_hosts [i]) return (TRUE); } diff --git a/src/daemon/server_config.h b/src/daemon/server_config.h index 3f30020c..09ae9ae8 100644 --- a/src/daemon/server_config.h +++ b/src/daemon/server_config.h @@ -3,9 +3,9 @@ #define SERVER_UID 99 #define SERVER_GID 99 -#define HOST_TABLE_ENTRIES 0 +#define HOST_TABLE_ENTRIES 1 const char *permitted_host_names [HOST_TABLE_ENTRIES] = -{ }; +{ NULL }; unsigned long permitted_hosts [HOST_TABLE_ENTRIES]; diff --git a/src/daemon/server_config.h.in b/src/daemon/server_config.h.in index fee61d39..f7884c8d 100644 --- a/src/daemon/server_config.h.in +++ b/src/daemon/server_config.h.in @@ -21,7 +21,7 @@ #define SERVER_UID 99 /* User ID the server should run as. */ #define SERVER_GID 99 /* Group ID the server should run as. */ -#define HOST_TABLE_ENTRIES 0 /* Number of entries in the host table. */ +#define HOST_TABLE_ENTRIES 1 /* Number of entries in the host table. */ /* List of hosts that should be authorized to connect to the server. * @@ -38,7 +38,7 @@ */ const char *permitted_host_names [HOST_TABLE_ENTRIES] = -{ }; +{ NULL }; unsigned long permitted_hosts [HOST_TABLE_ENTRIES];