From: Ted Lemon Date: Wed, 2 Feb 2000 05:38:07 +0000 (+0000) Subject: Add prand_config goo for resolver (temporary!). X-Git-Tag: V3-BETA-2-PATCH-1~365 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32e99078d815ef435e5d2b7602e3bdc34ba4b527;p=thirdparty%2Fdhcp.git Add prand_config goo for resolver (temporary!). --- diff --git a/includes/cf/aix.h b/includes/cf/aix.h index 7ce5c07c7..4e9549fde 100644 --- a/includes/cf/aix.h +++ b/includes/cf/aix.h @@ -88,3 +88,34 @@ extern int h_errno; #define USE_SOCKETS 1 #define HAVE_SA_LEN 1 #undef FDDI + +#ifdef NEED_PRAND_CONF +const char *cmds[] = { + "/bin/ps -ef 2>&1", + "/usr/bin/netstat -an 2>&1", + "/bin/df 2>&1", + "/usr/bin/uptime 2>&1", + "/usr/bin/printenv 2>&1", + "/usr/bin/netstat -s 2>&1", + "/usr/bin/w 2>&1", + NULL +}; + +const char *dirs[] = { + "/tmp", + "/var/tmp", + ".", + "/", + "/var/spool", + "/var/adm", + "/dev", + "/var/spool/mail", + "/home", + NULL +}; + +const char *files[] = { + "/var/adm/wtmp", + NULL +}; +#endif /* NEED_PRAND_CONF */ diff --git a/includes/cf/alphaosf.h b/includes/cf/alphaosf.h index f7be713cc..33f2e6f36 100644 --- a/includes/cf/alphaosf.h +++ b/includes/cf/alphaosf.h @@ -91,3 +91,37 @@ typedef unsigned long u_int64_t; #endif #define PTRSIZE_64BIT + +#ifdef NEED_PRAND_CONF +const char *cmds[] = { + "/bin/ps -ef 2>&1", + "/usr/sbin/arp -an 2>&1", + "/usr/sbin/netstat -an 2>&1", + "/bin/df 2>&1", + "/usr/bin/dig com. soa +ti=1 +retry=0 2>&1", + "/usr/ucb/uptime 2>&1", + "/usr/sbin/netstat -an 2>&1", + "/bin/iostat 2>&1", + NULL +}; + +const char *dirs[] = { + "/tmp", + "/var/tmp", + ".", + "/", + "/var/spool", + "/var/adm", + "/dev", + "/var/spool/mail", + "/home", + NULL +}; + +const char *files[] = { + "/var/adm/messages", + "/var/adm/wtmp", + "/var/adm/lastlog", + NULL +}; +#endif /* NEED_PRAND_CONF */ diff --git a/includes/cf/bsdos.h b/includes/cf/bsdos.h index 1dde70777..597a8409b 100644 --- a/includes/cf/bsdos.h +++ b/includes/cf/bsdos.h @@ -75,3 +75,37 @@ extern int h_errno; #if _BSDI_VERSION < 199802 typedef int socklen_t; #endif + +#ifdef NEED_PRAND_CONF +const char *cmds[] = { + "/bin/ps -axlw 2>&1", + "/usr/sbin/arp -an 2>&1", + "/usr/sbin/netstat -an 2>&1", + "/bin/df 2>&1", + "/usr/bin/dig com. soa +ti=1 +retry=0 2>&1", + "/usr/ucb/uptime 2>&1", + "/usr/sbin/netstat -an 2>&1", + "/usr/sbin/iostat 2>&1", + "/usr/sbin/vmstat 2>&1", + NULL +}; + +const char *dirs[] = { + "/tmp", + "/var/tmp", + ".", + "/", + "/var/spool", + "/dev", + "/var/mail", + "/usr/home", + NULL +}; + +const char *files[] = { + "/var/log/messages", + "/var/log/wtmp", + "/var/log/lastlog", + NULL +}; +#endif /* NEED_PRAND_CONF */ diff --git a/includes/cf/freebsd.h b/includes/cf/freebsd.h index d8ccbeba9..47752c20e 100644 --- a/includes/cf/freebsd.h +++ b/includes/cf/freebsd.h @@ -75,3 +75,42 @@ extern int h_errno; #if defined (USE_DEFAULT_NETWORK) # define USE_BPF #endif +#ifdef NEED_PRAND_CONF +#ifndef HAVE_DEV_RANDOM + # define HAVE_DEV_RANDOM 1 + #endif /* HAVE_DEV_RANDOM */ + +const char *cmds[] = { + "/bin/ps -axlw 2>&1", + "/usr/sbin/arp -an 2>&1", + "/usr/bin/netstat -an 2>&1", + "/bin/df 2>&1", + "/usr/bin/dig com. soa +ti=1 +retry=0 2>&1", + "/usr/bin/netstat -an 2>&1", + "/usr/bin/dig . soa +ti=1 +retry=0 2>&1", + "/usr/sbin/iostat 2>&1", + "/usr/bin/vmstat 2>&1", + "/usr/bin/w 2>&1", + NULL +}; + +const char *dirs[] = { + "/tmp", + "/usr/tmp", + ".", + "/", + "/var/spool", + "/dev", + "/var/mail", + "/home", + "/usr/home", + NULL +}; + +const char *files[] = { + "/var/log/messages", + "/var/log/wtmp", + "/var/log/lastlog", + NULL +}; +#endif /* NEED_PRAND_CONF */ diff --git a/includes/cf/hpux.h b/includes/cf/hpux.h index f7cdaffbb..d640ab141 100644 --- a/includes/cf/hpux.h +++ b/includes/cf/hpux.h @@ -80,3 +80,33 @@ extern int h_errno; #define BYTE_ORDER BIG_ENDIAN #define BIG_ENDIAN 1 +#ifdef NEED_PRAND_CONF +const char *cmds[] = { + "/usr/bin/ps -ef 2>&1", + "/usr/sbin/arp -an 2>&1", + "/usr/bin/netstat -an 2>&1", + "/usr/bin/df 2>&1", + "/usr/bin/netstat -an 2>&1", + "/usr/bin/vmstat 2>&1", + "/usr/bin/w 2>&1", + NULL +}; + +const char *dirs[] = { + "/tmp", + "/var/tmp", + ".", + "/", + "/var/spool", + "/var/adm", + "/dev", + "/var/mail", + "/home", + NULL +}; + +const char *files[] = { + "/var/adm/wtmp", + NULL +}; +#endif /* NEED_PRAND_CONF */ diff --git a/includes/cf/irix.h b/includes/cf/irix.h new file mode 100644 index 000000000..2ec3a866e --- /dev/null +++ b/includes/cf/irix.h @@ -0,0 +1,125 @@ +/* irix.h */ + +/* + * Copyright (c) 1996, 1999 The Internet Software Consortium. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of The Internet Software Consortium nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND + * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * INTERNET SOFTWARE CONSORTIUM OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#define int8_t char +#define int16_t short +#define int32_t long + +#define u_int8_t unsigned char +#define u_int16_t unsigned short +#define u_int32_t unsigned long + +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +extern int h_errno; + +#include +#include + +#define _PATH_DHCPD_CONF "/usr/local/etc/dhcpd.conf" +#define _PATH_DHCPD_DB "/usr/local/etc/dhcp/dhcpd.leases" + +#ifndef _PATH_DHCPD_PID +#define _PATH_DHCPD_PID "/etc/dhcpd.pid" +#endif +#ifndef _PATH_DHCLIENT_PID +#define _PATH_DHCLIENT_PID "/etc/dhclient.pid" +#endif +#ifndef _PATH_DHCRELAY_PID +#define _PATH_DHCRELAY_PID "/etc/dhcrelay.pid" +#endif + +#include +#define VA_DOTDOTDOT ... +#define VA_start(list, last) va_start (list, last) +#define va_dcl + +#define vsnprintf(buf, size, fmt, list) vsprintf (buf, fmt, list) +#define NO_SNPRINTF + +#if defined (USE_DEFAULT_NETWORK) +# define USE_RAW_SOCKETS +#endif + +#define EOL '\n' +#define VOIDPTR void * + +#include + +#define TIME time_t +#define GET_TIME(x) time ((x)) + +#define random rand +#ifdef NEED_PRAND_CONF +const char *cmds[] = { + "/bin/ps -ef 2>&1", + "/usr/etc/arp -a 2>&1", + "/usr/etc/netstat -an 2>&1", + "/bin/df 2>&1", + "/usr/bin/dig com. soa +ti=1 2>&1", + "/usr/bsd/uptime 2>&1", + "/usr/bin/printenv 2>&1", + "/usr/etc/netstat -s 2>&1", + "/usr/bin/dig . soa +ti=1 2>&1", + "/usr/bsd/w 2>&1", + NULL +}; + +const char *dirs[] = { + "/tmp", + "/var/tmp", + ".", + "/", + "/var/spool", + "/var/adm", + "/dev", + "/var/mail", + NULL +}; + +const char *files[] = { + NULL +}; +#endif /* NEED_PRAND_CONF */ diff --git a/includes/cf/linux.h b/includes/cf/linux.h index 9437a5ff7..3562dce88 100644 --- a/includes/cf/linux.h +++ b/includes/cf/linux.h @@ -125,3 +125,48 @@ extern int h_errno; #define ALIAS_NAMES_PERMUTED #define SKIP_DUMMY_INTERFACES + +#ifdef NEED_PRAND_CONF +#ifndef HAVE_DEV_RANDOM + # define HAVE_DEV_RANDOM 1 + #endif /* HAVE_DEV_RANDOM */ + +const char *cmds[] = { + "/bin/ps -axlw 2>&1", + "/sbin/arp -an 2>&1", + "/bin/netstat -an 2>&1", + "/bin/df 2>&1", + "/usr/bin/dig com. soa +ti=1 +retry=0 2>&1", + "/usr/bin/uptime 2>&1", + "/bin/netstat -s 2>&1", + "/usr/bin/dig . soa +ti=1 +retry=0 2>&1", + "/usr/bin/vmstat 2>&1", + "/usr/bin/w 2>&1", + NULL +}; + +const char *dirs[] = { + "/tmp", + "/usr/tmp", + ".", + "/", + "/var/spool", + "/dev", + "/var/spool/mail", + "/home", + "/usr/home", + NULL +}; + +const char *files[] = { + "/proc/stat", + "/proc/rtc", + "/proc/meminfo", + "/proc/interrupts", + "/proc/self/status", + "/var/log/messages", + "/var/log/wtmp", + "/var/log/lastlog", + NULL +}; +#endif /* NEED_PRAND_CONF */ diff --git a/includes/cf/netbsd.h b/includes/cf/netbsd.h index 4e08a7204..117378667 100644 --- a/includes/cf/netbsd.h +++ b/includes/cf/netbsd.h @@ -79,3 +79,44 @@ extern int h_errno; #ifdef __alpha__ #define PTRSIZE_64BIT #endif + +#ifdef NEED_PRAND_CONF +/* prand_conf.h goop - remove when BIND 9 comes around. */ +#ifndef HAVE_DEV_RANDOM + # define HAVE_DEV_RANDOM 1 + #endif /* HAVE_DEV_RANDOM */ + +const char *cmds[] = { + "/bin/ps -axlw 2>&1", + "/usr/sbin/arp -an 2>&1", + "/usr/bin/netstat -an 2>&1", + "/bin/df 2>&1", + "/usr/bin/dig com. soa +ti=1 +retry=0 2>&1", + "/usr/bin/netstat -an 2>&1", + "/usr/bin/dig . soa +ti=1 +retry=0 2>&1", + "/usr/sbin/iostat 2>&1", + "/usr/bin/vmstat 2>&1", + "/usr/bin/w 2>&1", + NULL +}; + +const char *dirs[] = { + "/tmp", + "/var/tmp", + ".", + "/", + "/var/spool", + "/dev", + "/var/mail", + "/home", + "/usr/home", + NULL +}; + +const char *files[] = { + "/var/log/messages", + "/var/log/wtmp", + "/var/log/lastlog", + NULL +}; +#endif /* NEED_PRAND_CONF */ diff --git a/includes/cf/nextstep.h b/includes/cf/nextstep.h index aba934168..d250c0006 100644 --- a/includes/cf/nextstep.h +++ b/includes/cf/nextstep.h @@ -104,3 +104,38 @@ extern int h_errno; #import #define TIME time_t #define GET_TIME(x) time ((x)) + +#ifdef NEED_PRAND_CONF +const char *cmds[] = { + "/bin/ps -axlw 2>&1", + "/usr/etc/arp -a 2>&1", + "/usr/ucb/netstat -an 2>&1", + "/bin/df 2>&1", + "/usr/local/bin/dig com. soa +ti=1 2>&1", + "/usr/ucb/uptime 2>&1", + "/usr/ucb/printenv 2>&1", + "/usr/ucb/netstat -s 2>&1", + "/usr/local/bin/dig . soa +ti=1 2>&1", + "/usr/bin/iostat 2>&1", + "/usr/bin/vm_stat 2>&1", + "/usr/ucb/w 2>&1", + NULL +}; + +const char *dirs[] = { + "/tmp", + "/usr/tmp", + ".", + "/", + "/usr/spool", + "/dev", + NULL +}; + +const char *files[] = { + "/usr/adm/messages", + "/usr/adm/wtmp", + "/usr/adm/lastlog", + NULL +}; +#endif /* NEED_PRAND_CONF */ diff --git a/includes/cf/openbsd.h b/includes/cf/openbsd.h index b052ea960..5e855b89d 100644 --- a/includes/cf/openbsd.h +++ b/includes/cf/openbsd.h @@ -79,3 +79,40 @@ extern int h_errno; #ifdef __alpha__ #define PTRSIZE_64BIT #endif + +#ifdef NEED_PRAND_CONF +#ifndef HAVE_DEV_RANDOM + # define HAVE_DEV_RANDOM 1 + #endif /* HAVE_DEV_RANDOM */ + +const char *cmds[] = { + "/bin/ps -axlw 2>&1", + "/usr/sbin/arp -an 2>&1", + "/usr/bin/netstat -an 2>&1", + "/bin/df 2>&1", + "/usr/bin/netstat -an 2>&1", + "/usr/sbin/iostat 2>&1", + "/usr/bin/vmstat 2>&1", + "/usr/bin/w 2>&1", + NULL +}; + +const char *dirs[] = { + "/tmp", + "/var/tmp", + ".", + "/", + "/var/spool", + "/dev", + "/var/mail", + "/home", + NULL +}; + +const char *files[] = { + "/var/log/messages", + "/var/log/wtmp", + "/var/log/lastlog", + NULL +}; +#endif /* NEED_PRAND_CONF */ diff --git a/includes/cf/qnx.h b/includes/cf/qnx.h index 3447c4fa2..8034dcffe 100644 --- a/includes/cf/qnx.h +++ b/includes/cf/qnx.h @@ -95,3 +95,7 @@ typedef signed long int32_t; where is replaced by the hostname or IP number of the machine that dhcpd is running on. */ + +#ifdef NEED_PRAND_CONF +UHOH... (this isn't present in the BIND distribution either) +#endif /* NEED_PRAND_CONF */ diff --git a/includes/cf/rhapsody.h b/includes/cf/rhapsody.h index f65f36560..e1c867f79 100644 --- a/includes/cf/rhapsody.h +++ b/includes/cf/rhapsody.h @@ -78,3 +78,31 @@ extern int h_errno; #ifdef __alpha__ #define PTRSIZE_64BIT #endif + +#ifdef NEED_PRAND_CONF +const char *cmds[] = { + "/bin/ps -axlw 2>&1", + "/usr/sbin/netstat -an 2>&1", + "/bin/df 2>&1", + "/usr/bin/uptime 2>&1", + "/usr/bin/printenv 2>&1", + "/usr/sbin/netstat -s 2>&1", + "/usr/bin/vm_stat 2>&1", + "/usr/bin/w 2>&1", + NULL +}; + +const char *dirs[] = { + "/var/tmp", + ".", + "/", + "/var/spool", + "/var/mail", + NULL +}; + +const char *files[] = { + "/var/log/wtmp", + NULL +}; +#endif /* NEED_PRAND_CONF */ diff --git a/includes/cf/sco.h b/includes/cf/sco.h index d2fe05395..b32da3381 100644 --- a/includes/cf/sco.h +++ b/includes/cf/sco.h @@ -103,3 +103,32 @@ extern int h_errno; #define TIME time_t #define GET_TIME(x) time ((x)) + +#ifdef NEED_PRAND_CONF +const char *cmds[] = { + "/bin/ps -ef 2>&1", + "/etc/arp -n -a 2>&1", + "/usr/bin/netstat -an 2>&1", + "/bin/df 2>&1", + "/usr/bin/uptime 2>&1", + "/usr/bin/netstat -s 2>&1", + "/usr/bin/vmstat 2>&1", + "/usr/bin/w 2>&1", + NULL +}; + +const char *dirs[] = { + "/tmp", + "/usr/tmp", + ".", + "/", + "/var/spool", + "/var/adm", + "/dev", + NULL +}; + +const char *files[] = { + NULL +}; +#endif /* NEED_PRAND_CONF */ diff --git a/includes/cf/sunos4.h b/includes/cf/sunos4.h index 6c41b0b97..b3feaccd5 100644 --- a/includes/cf/sunos4.h +++ b/includes/cf/sunos4.h @@ -124,3 +124,36 @@ char *strerror PROTO ((int)); #define TIME time_t #define GET_TIME(x) time ((x)) + +#ifdef NEED_PRAND_CONF +const char *cmds[] = { + "/bin/ps -axlw 2>&1", + "/usr/ucb/netstat -an 2>&1", + "/bin/df 2>&1", + "/usr/bin/dig com. soa +ti=1 +retry=0 2>&1", + "/usr/ucb/uptime 2>&1", + "/usr/ucb/netstat -an 2>&1", + "/bin/iostat 2>&1", + NULL +}; + +const char *dirs[] = { + "/tmp", + "/var/tmp", + ".", + "/", + "/var/spool", + "/var/adm", + "/dev", + "/var/mail", + "/home", + NULL +}; + +const char *files[] = { + "/var/adm/messages", + "/var/adm/wtmp", + "/var/adm/lastlog", + NULL +}; +#endif /* NEED_PRAND_CONF */ diff --git a/includes/cf/sunos5-5.h b/includes/cf/sunos5-5.h index b5f3df2aa..29e729396 100644 --- a/includes/cf/sunos5-5.h +++ b/includes/cf/sunos5-5.h @@ -149,3 +149,37 @@ extern int h_errno; #endif #define ALIAS_NAMES_PERMUTED + +#ifdef NEED_PRAND_CONF +const char *cmds[] = { + "/bin/ps -ef 2>&1", + "/usr/ucb/netstat -an 2>&1", + "/bin/df 2>&1", + "/usr/bin/dig com. soa +ti=1 +retry=0 2>&1", + "/usr/ucb/uptime 2>&1", + "/usr/ucb/netstat -an 2>&1", + "/bin/iostat 2>&1", + NULL +}; + +const char *dirs[] = { + "/tmp", + "/var/tmp", + ".", + "/", + "/var/spool", + "/var/adm", + "/dev", + "/var/mail", + "/home", + NULL +}; + +const char *files[] = { + "/proc/self/status", + "/var/adm/messages", + "/var/adm/wtmp", + "/var/adm/lastlog", + NULL +}; +#endif /* NEED_PRAND_CONF */ diff --git a/includes/cf/ultrix.h b/includes/cf/ultrix.h index 5225f7efd..71cde27ad 100644 --- a/includes/cf/ultrix.h +++ b/includes/cf/ultrix.h @@ -99,3 +99,35 @@ extern int h_errno; #if defined (USE_DEFAULT_NETWORK) # define USE_UPF #endif + +#ifdef NEED_PRAND_CONF +const char *cmds[] = { + "/bin/ps -aux 2>&1", + "/usr/etc/arp -an 2>&1", + "/usr/ucb/netstat -an 2>&1", + "/usr/bin/df 2>&1", + "/usr/ucb/uptime 2>&1", + "/usr/ucb/netstat -an 2>&1", + "/usr/bin/iostat 2>&1", + NULL +}; + +const char *dirs[] = { + "/tmp", + "/var/tmp", + ".", + "/", + "/var/spool", + "/var/adm", + "/dev", + "/var/spool/mail", + NULL +}; + +const char *files[] = { + "/var/spool/mqueue/syslog", + "/var/adm/wtmp", + "/var/adm/lastlog", + NULL +}; +#endif /* NEED_PRAND_CONF */