|
|
@@ -1,223 +1,18 @@
|
|
|
-Index: common/client_msgs.c
|
|
|
---- common/client_msgs.c.orig 2001-10-29 17:34:11.000000000 +0100
|
|
|
-+++ common/client_msgs.c 2003-12-30 11:36:26.000000000 +0100
|
|
|
-@@ -145,22 +145,16 @@
|
|
|
- printf ("%%ok\n");
|
|
|
- }
|
|
|
-
|
|
|
--void print_response(va_alist)
|
|
|
-- va_dcl
|
|
|
-+void print_response(int resp_no, char *format, ...)
|
|
|
- {
|
|
|
- va_list list;
|
|
|
- int i;
|
|
|
-- int resp_no;
|
|
|
-- char *format;
|
|
|
- FILE *fp;
|
|
|
-
|
|
|
-- va_start(list);
|
|
|
-+ va_start(list, format);
|
|
|
-
|
|
|
- fp = get_out_fp();
|
|
|
-
|
|
|
-- resp_no = va_arg(list, int);
|
|
|
-- format = va_arg(list, char *);
|
|
|
--
|
|
|
- for (i = 0; i < N_RESP; i++)
|
|
|
- {
|
|
|
- if (resp[i].resp_no == resp_no)
|
|
|
-@@ -181,5 +175,6 @@
|
|
|
- vfprintf(fp, format, list);
|
|
|
-
|
|
|
- fprintf(fp, "\n");
|
|
|
-+ va_end(list);
|
|
|
- }
|
|
|
-
|
|
|
-Index: common/client_msgs.h
|
|
|
---- common/client_msgs.h.orig 2001-10-29 17:32:10.000000000 +0100
|
|
|
-+++ common/client_msgs.h 2003-12-30 11:37:02.000000000 +0100
|
|
|
-@@ -85,7 +85,7 @@
|
|
|
-
|
|
|
- void print_error PROTO((int err_no, char *str));
|
|
|
-
|
|
|
--void print_response PROTO(());
|
|
|
-+void print_response PROTO((int, char *, ...));
|
|
|
-
|
|
|
- void print_ok PROTO((void));
|
|
|
-
|
|
|
Index: common/common.h
|
|
|
---- common/common.h.orig 2000-10-12 19:53:38.000000000 +0200
|
|
|
-+++ common/common.h 2003-12-30 11:37:53.000000000 +0100
|
|
|
-@@ -13,6 +13,8 @@
|
|
|
- #ifndef _COMMON_H_
|
|
|
- #define _COMMON_H_
|
|
|
+--- common/common.h.orig 2004-01-08 00:25:46.000000000 +0100
|
|
|
++++ common/common.h 2004-01-08 21:09:46.000000000 +0100
|
|
|
+@@ -140,6 +140,8 @@
|
|
|
+ #undef HAVE_SOCKADDR_STORAGE
|
|
|
+ #endif
|
|
|
|
|
|
+/* the name 'log' conflicts with gcc-3.x builtin */
|
|
|
+#define log rwhoisd_log
|
|
|
|
|
|
- /* Add prototype support. */
|
|
|
- #ifndef PROTO
|
|
|
-@@ -56,7 +58,7 @@
|
|
|
- # undef _VA_ALIGN
|
|
|
- # undef __va_stack_arg
|
|
|
- # endif
|
|
|
--#include <varargs.h>
|
|
|
-+#include <stdarg.h>
|
|
|
- #endif /* HAVE_VPRINTF */
|
|
|
-
|
|
|
- /* this should probably be #ifdef USG */
|
|
|
-Index: common/log.c
|
|
|
---- common/log.c.orig 2001-11-21 22:44:55.000000000 +0100
|
|
|
-+++ common/log.c 2003-12-30 11:38:39.000000000 +0100
|
|
|
-@@ -139,15 +139,11 @@
|
|
|
- /* log_error: prints a error message to the console. This is intended
|
|
|
- for server side errors only. */
|
|
|
- void
|
|
|
--log_error(va_alist)
|
|
|
-- va_dcl
|
|
|
-+log_error(char *format, ...)
|
|
|
- {
|
|
|
- va_list list;
|
|
|
-- char *format;
|
|
|
- char err_buf[MAX_LINE];
|
|
|
--
|
|
|
-- va_start(list);
|
|
|
-- format = va_arg(list, char *);
|
|
|
-+ va_start(list, format);
|
|
|
-
|
|
|
- #ifdef HAVE_VSNPRINTF
|
|
|
- vsnprintf(err_buf, sizeof(err_buf), format, list);
|
|
|
-@@ -164,15 +160,11 @@
|
|
|
- /* log_warning: prints a warning message to the console. This is intended
|
|
|
- for server side warnings only. */
|
|
|
- void
|
|
|
--log_warning(va_alist)
|
|
|
-- va_dcl
|
|
|
-+log_warning(char *format, ...)
|
|
|
- {
|
|
|
- va_list list;
|
|
|
-- char *format;
|
|
|
- char err_buf[MAX_LINE];
|
|
|
--
|
|
|
-- va_start(list);
|
|
|
-- format = va_arg(list, char *);
|
|
|
-+ va_start(list, format);
|
|
|
-
|
|
|
- #ifdef HAVE_VSNPRINTF
|
|
|
- vsnprintf(err_buf, sizeof(err_buf), format, list);
|
|
|
-Index: common/log.h
|
|
|
---- common/log.h.orig 2000-10-12 19:53:39.000000000 +0200
|
|
|
-+++ common/log.h 2003-12-30 11:39:22.000000000 +0100
|
|
|
-@@ -95,8 +95,8 @@
|
|
|
- /* old prototypes for backward compatibility */
|
|
|
-
|
|
|
- #define l_strerror strerror
|
|
|
--void log_error PROTO(());
|
|
|
--void log_warning PROTO(());
|
|
|
-+void log_error PROTO((char *, ...));
|
|
|
-+void log_warning PROTO((char *, ...));
|
|
|
- char *get_client_hostname PROTO((int sock));
|
|
|
- char *timestamp PROTO(());
|
|
|
-
|
|
|
-@@ -106,7 +106,7 @@
|
|
|
- (L_LOG_EMERG, L_LOG_ALERT, etc. [see internal_log_level in
|
|
|
- types.h) and SECTION is one of (NETWORK, QUERY, CONFIG, etc [see
|
|
|
- log_section in types.h) */
|
|
|
--void log PROTO(());
|
|
|
-+void log PROTO((internal_log_levels, int, char *, ...));
|
|
|
-
|
|
|
- void setup_logging PROTO((void));
|
|
|
-
|
|
|
-Index: common/rw_log.c
|
|
|
---- common/rw_log.c.orig 2001-11-21 22:43:24.000000000 +0100
|
|
|
-+++ common/rw_log.c 2003-12-30 11:39:48.000000000 +0100
|
|
|
-@@ -17,13 +17,10 @@
|
|
|
- #include "types.h"
|
|
|
-
|
|
|
- void
|
|
|
--log(va_alist)
|
|
|
-- va_dcl
|
|
|
-+log(internal_log_levels level, int section, char *format, ...)
|
|
|
- {
|
|
|
- va_list ap;
|
|
|
-- internal_log_levels level;
|
|
|
- FILE *fp;
|
|
|
-- char *format;
|
|
|
- char *filename;
|
|
|
- char *hostname;
|
|
|
- char message[MAX_LINE];
|
|
|
-@@ -31,18 +28,12 @@
|
|
|
- char *section_name;
|
|
|
- int fd;
|
|
|
- int use_syslog;
|
|
|
-- int section;
|
|
|
- int syslog_level;
|
|
|
--
|
|
|
-- va_start(ap);
|
|
|
-- level = (internal_log_levels) va_arg(ap, int);
|
|
|
-- section = (int) va_arg(ap, int);
|
|
|
-- format = va_arg(ap, char*);
|
|
|
--
|
|
|
-+ va_start(ap, format);
|
|
|
- /* verbosity sets the level at which we ignore log messages */
|
|
|
- if (level > get_verbosity())
|
|
|
- {
|
|
|
-- return;
|
|
|
-+ goto end_proc; /* single point for va_end(ap) and return */
|
|
|
- }
|
|
|
-
|
|
|
- /* first we check to see if we're loggin to syslog or not */
|
|
|
-@@ -83,7 +74,7 @@
|
|
|
- syslog_level = local_to_syslog(level);
|
|
|
- if (syslog_level < 0)
|
|
|
- {
|
|
|
-- return;
|
|
|
-+ goto end_proc; /* single point for va_end(ap) and return */
|
|
|
- }
|
|
|
-
|
|
|
- syslog(syslog_level, "%s", message);
|
|
|
-@@ -93,7 +84,7 @@
|
|
|
- {
|
|
|
- filename = get_log_filename(level);
|
|
|
-
|
|
|
-- if (filename == NULL) return;
|
|
|
-+ if (filename == NULL) goto end_proc; /* single point for va_end(ap) and return */
|
|
|
-
|
|
|
- if (STR_EQ(filename, "stderr"))
|
|
|
- {
|
|
|
-@@ -142,4 +133,7 @@
|
|
|
-
|
|
|
- fclose(fp);
|
|
|
- }
|
|
|
-+end_proc: /* single point for va_end(ap) and return */
|
|
|
-+ va_end(ap);
|
|
|
-+ return;
|
|
|
- }
|
|
|
-Index: sample.data/Makefile.in
|
|
|
---- sample.data/Makefile.in.orig 1999-09-14 21:20:47.000000000 +0200
|
|
|
-+++ sample.data/Makefile.in 2003-12-30 11:32:30.000000000 +0100
|
|
|
-@@ -15,7 +15,9 @@
|
|
|
- srcdir = @srcdir@
|
|
|
- VPATH = @srcdir@
|
|
|
+ #endif /* _COMMON_H_ */
|
|
|
|
|
|
--RWHOIS_ROOT_DIR = $(prefix)
|
|
|
-+DESTDIR =
|
|
|
-+
|
|
|
-+RWHOIS_ROOT_DIR = $(DESTDIR)$(etcdir)/rwhoisd/samples
|
|
|
-
|
|
|
- FILES = \
|
|
|
- a.com \
|
|
|
-@@ -31,6 +33,7 @@
|
|
|
- all:
|
|
|
-
|
|
|
- install:
|
|
|
-+ - [ -d $(RWHOIS_ROOT_DIR) ] && mkdir -p $(RWHOIS_ROOT_DIR)
|
|
|
- @for file in $(FILES); do \
|
|
|
- echo "installing $$file into $(RWHOIS_ROOT_DIR)"; \
|
|
|
- ($(CP) -pr $(srcdir)/$$file $(RWHOIS_ROOT_DIR)) || exit 1; \
|
|
|
Index: sample.data/rwhoisd.conf
|
|
|
--- sample.data/rwhoisd.conf.orig 1997-11-26 00:23:46.000000000 +0100
|
|
|
-+++ sample.data/rwhoisd.conf 2003-12-30 11:32:30.000000000 +0100
|
|
|
++++ sample.data/rwhoisd.conf 2004-01-08 21:09:50.000000000 +0100
|
|
|
@@ -12,13 +12,13 @@
|
|
|
# normal default is ""
|
|
|
# NOTE: you want to change this.
|
|
|
@@ -305,136 +100,3 @@ Index: sample.data/rwhoisd.conf
|
|
|
|
|
|
# pgp-keyring-path: the path to the directory containing the pgp
|
|
|
# public and private keyrings (pubring.pgp, secring.pgp, etc).
|
|
|
-Index: server/Makefile.in
|
|
|
---- server/Makefile.in.orig 2000-05-11 18:10:25.000000000 +0200
|
|
|
-+++ server/Makefile.in 2003-12-30 11:32:30.000000000 +0100
|
|
|
-@@ -9,11 +9,13 @@
|
|
|
- prefix = @prefix@
|
|
|
- exec_prefix = @exec_prefix@
|
|
|
- bindir = $(exec_prefix)/bin
|
|
|
--etcdir = $(exec_prefix)/etc
|
|
|
-+sbindir = $(exec_prefix)/sbin
|
|
|
-
|
|
|
- srcdir = @srcdir@
|
|
|
- VPATH = @srcdir@
|
|
|
-
|
|
|
-+DESTDIR =
|
|
|
-+
|
|
|
- # local libs/includes
|
|
|
- COMMON_INC = -I$(srcdir)/../common
|
|
|
- COMMON_LIBS = -L../common -lrwcommon
|
|
|
-@@ -96,12 +98,12 @@
|
|
|
- #
|
|
|
-
|
|
|
- install:
|
|
|
-- if [ ! -d $(exec_prefix) ]; then mkdir $(exec_prefix); fi
|
|
|
-- if [ ! -d $(etcdir) ]; then mkdir $(etcdir); fi
|
|
|
-- $(INSTALL) rwhoisd $(etcdir)
|
|
|
-+ if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir $(DESTDIR)$(exec_prefix); fi
|
|
|
-+ if [ ! -d $(DESTDIR)$(sbindir) ]; then mkdir $(DESTDIR)$(sbindir); fi
|
|
|
-+ $(INSTALL) rwhoisd $(DESTDIR)$(sbindir)
|
|
|
-
|
|
|
- uninstall:
|
|
|
-- $(RM) $(etcdir)/rwhoisd
|
|
|
-+ $(RM) $(DESTDIR)$(sbindir)/rwhoisd
|
|
|
-
|
|
|
- clean:
|
|
|
- rm -f *.[oa]
|
|
|
-Index: server/notify.c
|
|
|
---- server/notify.c.orig 2000-10-12 19:56:14.000000000 +0200
|
|
|
-+++ server/notify.c 2003-12-30 11:40:22.000000000 +0100
|
|
|
-@@ -75,25 +75,19 @@
|
|
|
-
|
|
|
- /* log notify information */
|
|
|
- int
|
|
|
--log_entry(va_alist)
|
|
|
-- va_dcl
|
|
|
-+log_entry(char *filename, char *format, ...)
|
|
|
- {
|
|
|
- va_list ap;
|
|
|
- FILE *fp;
|
|
|
-- char *format;
|
|
|
-- char *filename;
|
|
|
- char *hostname;
|
|
|
--
|
|
|
-- va_start(ap);
|
|
|
-- filename = va_arg (ap, char*);
|
|
|
-- format = va_arg(ap, char*);
|
|
|
--
|
|
|
-+ va_start(ap, format);
|
|
|
- /* lock the file */
|
|
|
- fp = get_file_lock(filename, "a", 60);
|
|
|
- if (!fp)
|
|
|
- {
|
|
|
- log(L_LOG_ERR, DIRECTIVES, "could not open file '%s' for writing: %s",
|
|
|
- filename, strerror(errno));
|
|
|
-+ va_end(ap);
|
|
|
- return FALSE;
|
|
|
- }
|
|
|
-
|
|
|
-@@ -106,6 +100,7 @@
|
|
|
-
|
|
|
- release_file_lock(filename, fp);
|
|
|
-
|
|
|
-+ va_end(ap);
|
|
|
- return (TRUE);
|
|
|
- }
|
|
|
-
|
|
|
-Index: tools/rwhois_deleter/Makefile.in
|
|
|
---- tools/rwhois_deleter/Makefile.in.orig 1998-07-10 20:37:25.000000000 +0200
|
|
|
-+++ tools/rwhois_deleter/Makefile.in 2003-12-30 11:32:30.000000000 +0100
|
|
|
-@@ -13,6 +13,8 @@
|
|
|
- bindir = $(exec_prefix)/bin
|
|
|
- etcdir = $(exec_prefix)/etc
|
|
|
-
|
|
|
-+DESTDIR =
|
|
|
-+
|
|
|
- srcdir = @srcdir@
|
|
|
- VPATH = @srcdir@
|
|
|
-
|
|
|
-@@ -52,12 +54,12 @@
|
|
|
- # procedural
|
|
|
-
|
|
|
- install:
|
|
|
-- if [ ! -d $(exec_prefix) ]; then mkdir $(exec_prefix); fi
|
|
|
-- if [ ! -d $(bindir) ]; then mkdir $(bindir); fi
|
|
|
-- $(INSTALL) rwhois_deleter $(bindir)
|
|
|
-+ if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir $(DESTDIR)$(exec_prefix); fi
|
|
|
-+ if [ ! -d $(DESTDIR)$(bindir) ]; then mkdir $(DESTDIR)$(bindir); fi
|
|
|
-+ $(INSTALL) rwhois_deleter $(DESTDIR)$(bindir)
|
|
|
-
|
|
|
- uninstall:
|
|
|
-- $(RM) $(bindir)/rwhois_deleter
|
|
|
-+ $(RM) $(DESTDIR)$(bindir)/rwhois_deleter
|
|
|
-
|
|
|
- clean:
|
|
|
- rm -f *.o rwhois_deleter
|
|
|
-Index: tools/rwhois_indexer/Makefile.in
|
|
|
---- tools/rwhois_indexer/Makefile.in.orig 1998-01-11 07:20:04.000000000 +0100
|
|
|
-+++ tools/rwhois_indexer/Makefile.in 2003-12-30 11:32:30.000000000 +0100
|
|
|
-@@ -13,6 +13,8 @@
|
|
|
- bindir = $(exec_prefix)/bin
|
|
|
- etcdir = $(exec_prefix)/etc
|
|
|
-
|
|
|
-+DESTDIR =
|
|
|
-+
|
|
|
- srcdir = @srcdir@
|
|
|
- VPATH = @srcdir@
|
|
|
-
|
|
|
-@@ -52,12 +54,12 @@
|
|
|
- # procedural
|
|
|
-
|
|
|
- install:
|
|
|
-- if [ ! -d $(exec_prefix) ]; then mkdir $(exec_prefix); fi
|
|
|
-- if [ ! -d $(bindir) ]; then mkdir $(bindir); fi
|
|
|
-- $(INSTALL) rwhois_indexer $(bindir)
|
|
|
-+ if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir $(DESTDIR)$(exec_prefix); fi
|
|
|
-+ if [ ! -d $(DESTDIR)$(bindir) ]; then mkdir $(DESTDIR)$(bindir); fi
|
|
|
-+ $(INSTALL) rwhois_indexer $(DESTDIR)$(bindir)
|
|
|
-
|
|
|
- uninstall:
|
|
|
-- $(RM) $(bindir)/rwhois_indexer
|
|
|
-+ $(RM) $(DESTDIR)$(bindir)/rwhois_indexer
|
|
|
-
|
|
|
- clean:
|
|
|
- rm -f *.o rwhois_indexer
|