head 1.4; access; symbols OPENPKG_E1_MP_HEAD:1.4 OPENPKG_E1_MP:1.4 OPENPKG_E1_MP_2_STABLE:1.4.2.2 OPENPKG_E1_FP:1.4.2.2 OPENPKG_2_STABLE_MP:1.4 OPENPKG_2_STABLE_20061018:1.4.2.2 OPENPKG_2_STABLE:1.4.0.2 OPENPKG_CW_FP:1.3; locks; strict; comment @# @; 1.4 date 2006.04.14.18.03.54; author rse; state Exp; branches 1.4.2.1; next 1.3; commitid z8G7J8oi994V1atr; 1.3 date 2004.02.21.08.09.03; author rse; state Exp; branches; next 1.2; 1.2 date 2004.01.08.20.32.53; author rse; state Exp; branches; next 1.1; 1.1 date 2003.12.30.14.21.13; author rse; state Exp; branches; next ; 1.4.2.1 date 2006.04.14.18.03.54; author rse; state dead; branches; next 1.4.2.2; commitid iZxwRSmmWscPXUQr; 1.4.2.2 date 2006.10.16.14.55.57; author rse; state Exp; branches; next ; commitid iZxwRSmmWscPXUQr; desc @@ 1.4 log @upgrading package: rwhoisd 1.5.9.5 -> 1.5.9.6 @ text @Index: common/common.h --- common/common.h.orig 2005-01-24 16:53:42 +0100 +++ common/common.h 2006-04-14 19:58:22 +0200 @@@@ -148,6 +148,8 @@@@ #undef HAVE_SOCKADDR_STORAGE #endif +/* the name 'log' conflicts with gcc-3.x builtin */ +#define log rwhoisd_log #endif /* _COMMON_H_ */ Index: sample.data/rwhoisd.conf --- sample.data/rwhoisd.conf.orig 2005-01-24 16:53:44 +0100 +++ sample.data/rwhoisd.conf 2006-04-14 19:58:22 +0200 @@@@ -12,13 +12,13 @@@@ # normal default is "" # NOTE: you want to change this. -root-dir: /home/databases/rwhoisd +root-dir: @@l_prefix@@/etc/rwhoisd # bin-path: Where to find extra binaries. # bin-path: bin means /bin # bin-path: /usr/local/bin means /usr/local/bin. # normal default is "bin" -# bin-path: bin +bin-path: @@l_prefix@@/bin # auth-area-file: The config file that contains the list of authority areas. # This file is required. @@@@ -66,7 +66,7 @@@@ # %see-also can be locally resolved. If omitted, rwhoisd will attempt # derive the value -# local-host: rwhois.a.com +# local-host: rwhois.example.com # local-port: The advertised port that rwhoisd listens to. The IANA # assigned port for RWhois is 4321 (and so that is the default). @@@@ -109,19 +109,19 @@@@ # users group, as found in /etc/passwd. # note that this really, really should be an unprivileged user # this options doesn't have a default. -userid: rwhoisd +userid: @@l_rusr@@ # pid-file: where to put the file containing the pid of the server. # normal default is "rwhoisd.pid" # pid-file: /var/run/rwhoisd.pid -pid-file: rwhoisd.pid +pid-file: @@l_prefix@@/var/rwhoisd/rwhoisd.pid # server contact: who to contact about problems related to the server # itself. # this option doesn't have a default. -server-contact: hostmaster@@a.com +server-contact: hostmaster@@example.com # use-syslog: whether or not to log using syslog; # if it isn't logging to syslog, it attempts to log to files (see below) @@@@ -138,20 +138,20 @@@@ # to log to if not overridden by at a particular level. # normal default is "rwhoisd.log" -# default-log-file: rwhoisd.log +default-log-file: @@l_prefix@@/var/rwhoisd/rwhoisd.log # -log-file: if not logging to syslog, log messages at # to this file. is one of {emergency, alert, crit, err, warn, # notice, info, debug} -# emergency-log-file: rwhois.crit.log -# alert-log-file: rwhois.crit.log -# crit-log-file: rwhois.crit.log -# err-log-file: rwhois.err.log -# warn-log-file: rwhois.err.log -# notice-log-file: rwhois.info.log -# info-log-file: rwhois.info.log -# debug-log-file: rwhois.info.log +emergency-log-file: @@l_prefix@@/var/rwhoisd/rwhois.crit.log +alert-log-file: @@l_prefix@@/var/rwhoisd/rwhois.crit.log +crit-log-file: @@l_prefix@@/var/rwhoisd/rwhois.crit.log +err-log-file: @@l_prefix@@/var/rwhoisd/rwhois.err.log +warn-log-file: @@l_prefix@@/var/rwhoisd/rwhois.err.log +notice-log-file: @@l_prefix@@/var/rwhoisd/rwhois.info.log +info-log-file: @@l_prefix@@/var/rwhoisd/rwhois.info.log +debug-log-file: @@l_prefix@@/var/rwhoisd/rwhois.info.log # verbosity: set the level at which you want logging to occur. The # higher the number, the more logging occurs. The value is a number @@@@ -189,7 +189,7 @@@@ # security feature, making it harder to interpose a bogus version of # pgp. If not set, it uses the server's PATH to find the binary. -# pgp-bin-path: /usr/local/bin/pgp +# pgp-bin-path: @@l_prefix@@/bin/pgp # pgp-keyring-path: the path to the directory containing the pgp # public and private keyrings (pubring.pgp, secring.pgp, etc). @ 1.4.2.1 log @file rwhoisd.patch was added on branch OPENPKG_2_STABLE on 2006-10-16 14:55:57 +0000 @ text @d1 102 @ 1.4.2.2 log @Mass merge from CURRENT to 2-STABLE (all packages except those of JUNK class) @ text @a0 102 Index: common/common.h --- common/common.h.orig 2005-01-24 16:53:42 +0100 +++ common/common.h 2006-04-14 19:58:22 +0200 @@@@ -148,6 +148,8 @@@@ #undef HAVE_SOCKADDR_STORAGE #endif +/* the name 'log' conflicts with gcc-3.x builtin */ +#define log rwhoisd_log #endif /* _COMMON_H_ */ Index: sample.data/rwhoisd.conf --- sample.data/rwhoisd.conf.orig 2005-01-24 16:53:44 +0100 +++ sample.data/rwhoisd.conf 2006-04-14 19:58:22 +0200 @@@@ -12,13 +12,13 @@@@ # normal default is "" # NOTE: you want to change this. -root-dir: /home/databases/rwhoisd +root-dir: @@l_prefix@@/etc/rwhoisd # bin-path: Where to find extra binaries. # bin-path: bin means /bin # bin-path: /usr/local/bin means /usr/local/bin. # normal default is "bin" -# bin-path: bin +bin-path: @@l_prefix@@/bin # auth-area-file: The config file that contains the list of authority areas. # This file is required. @@@@ -66,7 +66,7 @@@@ # %see-also can be locally resolved. If omitted, rwhoisd will attempt # derive the value -# local-host: rwhois.a.com +# local-host: rwhois.example.com # local-port: The advertised port that rwhoisd listens to. The IANA # assigned port for RWhois is 4321 (and so that is the default). @@@@ -109,19 +109,19 @@@@ # users group, as found in /etc/passwd. # note that this really, really should be an unprivileged user # this options doesn't have a default. -userid: rwhoisd +userid: @@l_rusr@@ # pid-file: where to put the file containing the pid of the server. # normal default is "rwhoisd.pid" # pid-file: /var/run/rwhoisd.pid -pid-file: rwhoisd.pid +pid-file: @@l_prefix@@/var/rwhoisd/rwhoisd.pid # server contact: who to contact about problems related to the server # itself. # this option doesn't have a default. -server-contact: hostmaster@@a.com +server-contact: hostmaster@@example.com # use-syslog: whether or not to log using syslog; # if it isn't logging to syslog, it attempts to log to files (see below) @@@@ -138,20 +138,20 @@@@ # to log to if not overridden by at a particular level. # normal default is "rwhoisd.log" -# default-log-file: rwhoisd.log +default-log-file: @@l_prefix@@/var/rwhoisd/rwhoisd.log # -log-file: if not logging to syslog, log messages at # to this file. is one of {emergency, alert, crit, err, warn, # notice, info, debug} -# emergency-log-file: rwhois.crit.log -# alert-log-file: rwhois.crit.log -# crit-log-file: rwhois.crit.log -# err-log-file: rwhois.err.log -# warn-log-file: rwhois.err.log -# notice-log-file: rwhois.info.log -# info-log-file: rwhois.info.log -# debug-log-file: rwhois.info.log +emergency-log-file: @@l_prefix@@/var/rwhoisd/rwhois.crit.log +alert-log-file: @@l_prefix@@/var/rwhoisd/rwhois.crit.log +crit-log-file: @@l_prefix@@/var/rwhoisd/rwhois.crit.log +err-log-file: @@l_prefix@@/var/rwhoisd/rwhois.err.log +warn-log-file: @@l_prefix@@/var/rwhoisd/rwhois.err.log +notice-log-file: @@l_prefix@@/var/rwhoisd/rwhois.info.log +info-log-file: @@l_prefix@@/var/rwhoisd/rwhois.info.log +debug-log-file: @@l_prefix@@/var/rwhoisd/rwhois.info.log # verbosity: set the level at which you want logging to occur. The # higher the number, the more logging occurs. The value is a number @@@@ -189,7 +189,7 @@@@ # security feature, making it harder to interpose a bogus version of # pgp. If not set, it uses the server's PATH to find the binary. -# pgp-bin-path: /usr/local/bin/pgp +# pgp-bin-path: @@l_prefix@@/bin/pgp # pgp-keyring-path: the path to the directory containing the pgp # public and private keyrings (pubring.pgp, secring.pgp, etc). @ 1.3 log @upgrading package: rwhoisd 1.5.7.4 -> 1.5.9 @ text @d2 3 a4 3 --- 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 @@@@ d14 2 a15 2 --- sample.data/rwhoisd.conf.orig 1997-11-26 00:23:46.000000000 +0100 +++ sample.data/rwhoisd.conf 2004-01-08 21:09:50.000000000 +0100 a102 20 Index: tools/rwhois_repack/Makefile.in --- tools/rwhois_repack/Makefile.in.orig 2004-02-04 18:14:15.000000000 +0100 +++ tools/rwhois_repack/Makefile.in 2004-02-21 09:07:46.000000000 +0100 @@@@ -52,12 +52,12 @@@@ # procedural install: - if [ ! -d $(exec_prefix) ]; then mkdir $(exec_prefix); fi - if [ ! -d $(bindir) ]; then mkdir $(bindir); fi - $(INSTALL) rwhois_repack $(bindir) + if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir $(DESTDIR)$(exec_prefix); fi + if [ ! -d $(DESTDIR)$(bindir) ]; then mkdir $(DESTDIR)$(bindir); fi + $(INSTALL) rwhois_repack $(DESTDIR)$(bindir) uninstall: - $(RM) $(bindir)/rwhois_repack + $(RM) $(DESTDIR)$(bindir)/rwhois_repack clean: rm -f *.o rwhois_repack @ 1.2 log @upgrading package: rwhoisd 1.5.7.3 -> 1.5.7.4 @ text @d103 20 @ 1.1 log @new package: rwhoisd 1.5.7.3 (Referral WHOIS Daemon) @ text @a0 47 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)); d2 5 a6 5 --- 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_ d11 2 a12 160 /* Add prototype support. */ #ifndef PROTO @@@@ -56,7 +58,7 @@@@ # undef _VA_ALIGN # undef __va_stack_arg # endif -#include +#include #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@@ -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; \ d15 1 a15 1 +++ sample.data/rwhoisd.conf 2003-12-30 11:32:30.000000000 +0100 a102 133 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 @