diff options
author | Martin Baulig <martin@src.gnome.org> | 1999-02-19 11:02:32 +0000 |
---|---|---|
committer | Martin Baulig <martin@src.gnome.org> | 1999-02-19 11:02:32 +0000 |
commit | ce4580187348b876d5c8ad46118c4c7a7feed923 (patch) | |
tree | d73b818a276938e508f66b3eb597fe1415a67793 /src | |
parent | a22d3fad3641e5682ad9f5438f9f7ff7de4abc35 (diff) | |
download | libgtop-ce4580187348b876d5c8ad46118c4c7a7feed923.tar.gz |
Make it work with Digital Unix native cc.
Diffstat (limited to 'src')
-rw-r--r-- | src/daemon/gnuserv.c | 7 | ||||
-rw-r--r-- | src/daemon/server_config.h | 4 | ||||
-rw-r--r-- | 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]; |