diff options
author | Geert Bevin <gbevin@gentoo.org> | 2002-04-06 06:40:22 +0000 |
---|---|---|
committer | Geert Bevin <gbevin@gentoo.org> | 2002-04-06 06:40:22 +0000 |
commit | 6230d1e1c84baf831ca3e168cdf2631623d7076f (patch) | |
tree | 8740e3cc35c08fbb217f1412fde5b0ce5e58ff9d /sys-apps/tcp-wrappers | |
parent | gcc3 fixes to tcp-wrappers (diff) | |
download | historical-6230d1e1c84baf831ca3e168cdf2631623d7076f.tar.gz historical-6230d1e1c84baf831ca3e168cdf2631623d7076f.tar.bz2 historical-6230d1e1c84baf831ca3e168cdf2631623d7076f.zip |
gcc3 fixes to tcp-wrappers
Diffstat (limited to 'sys-apps/tcp-wrappers')
-rw-r--r-- | sys-apps/tcp-wrappers/ChangeLog | 10 | ||||
-rw-r--r-- | sys-apps/tcp-wrappers/files/digest-tcp-wrappers-7.6-r4 | 1 | ||||
-rw-r--r-- | sys-apps/tcp-wrappers/files/tcp_wrappers_7.6-stdc.diff | 199 | ||||
-rw-r--r-- | sys-apps/tcp-wrappers/tcp-wrappers-7.6-r4.ebuild | 50 |
4 files changed, 259 insertions, 1 deletions
diff --git a/sys-apps/tcp-wrappers/ChangeLog b/sys-apps/tcp-wrappers/ChangeLog index b200578de175..ff09e29ce846 100644 --- a/sys-apps/tcp-wrappers/ChangeLog +++ b/sys-apps/tcp-wrappers/ChangeLog @@ -1,7 +1,15 @@ # ChangeLog for sys-apps/tcp-wrappers # Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL -# $Header: /var/cvsroot/gentoo-x86/sys-apps/tcp-wrappers/ChangeLog,v 1.1 2002/02/01 21:53:37 gbevin Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/tcp-wrappers/ChangeLog,v 1.2 2002/04/06 06:39:56 gbevin Exp $ +*tcp-wrappers-7.6-r4 (06 Apr 2002) + + 06 Apr 2002; G.Bevin <gbevin@gentoo.org> tcp-wrappers-7.6-r4.ebuild, + files/tcp_wrappers_7.6-stdc.diff files/digest-tcp-wrappers-7.6-r4 : + + Patches to make the tcp-wrappers header by stdc compliant and work without + problems with gcc 3. + *tcp-wrappers-7.6-r3 (1 Feb 2002) 1 Feb 2002; G.Bevin <gbevin@gentoo.org> ChangeLog : diff --git a/sys-apps/tcp-wrappers/files/digest-tcp-wrappers-7.6-r4 b/sys-apps/tcp-wrappers/files/digest-tcp-wrappers-7.6-r4 new file mode 100644 index 000000000000..bca5a7ef66fa --- /dev/null +++ b/sys-apps/tcp-wrappers/files/digest-tcp-wrappers-7.6-r4 @@ -0,0 +1 @@ +MD5 e6fa25f71226d090f34de3f6b122fb5a tcp_wrappers_7.6.tar.gz 99438 diff --git a/sys-apps/tcp-wrappers/files/tcp_wrappers_7.6-stdc.diff b/sys-apps/tcp-wrappers/files/tcp_wrappers_7.6-stdc.diff new file mode 100644 index 000000000000..b63714e9243a --- /dev/null +++ b/sys-apps/tcp-wrappers/files/tcp_wrappers_7.6-stdc.diff @@ -0,0 +1,199 @@ +--- tcpd.h_orig 2002-04-06 07:40:57.000000000 +0200 ++++ tcpd.h 2002-04-06 07:38:43.000000000 +0200 +@@ -65,17 +65,34 @@ + /* Global functions. */ + + #if defined(TLI) || defined(PTX) || defined(TLI_SEQUENT) ++#ifdef __STDC__ ++extern void fromhost(struct request_info *); /* get/validate client host info */ ++#else + extern void fromhost(); /* get/validate client host info */ ++#endif + #else + #define fromhost sock_host /* no TLI support needed */ + #endif + +-extern int hosts_access(); /* access control */ +-extern void shell_cmd(); /* execute shell command */ +-extern char *percent_x(); /* do %<char> expansion */ +-extern void rfc931(); /* client name from RFC 931 daemon */ +-extern void clean_exit(); /* clean up and exit */ +-extern void refuse(); /* clean up and exit */ ++#ifdef __STDC__ ++extern int hosts_access(struct request_info *); /* access control */ ++extern void shell_cmd(char *); /* execute shell command */ ++extern char *percent_x(char *, int, char *, struct request_info *); /* do %<char> expansion */ ++#ifdef INET6 ++extern void rfc931(struct sockaddr *, struct sockaddr *, char *); /* client name from RFC 931 daemon */ ++#else ++extern void rfc931(struct sockaddr_in *, struct sockaddr_in *, char *); /* client name from RFC 931 daemon */ ++#endif ++extern void clean_exit(struct request_info *); /* clean up and exit */ ++extern void refuse(struct request_info *); /* clean up and exit */ ++#else ++extern int hosts_access(); /* access control */ ++extern void shell_cmd(); /* execute shell command */ ++extern char *percent_x(); /* do %<char> expansion */ ++extern void rfc931(); /* client name from RFC 931 daemon */ ++extern void clean_exit(); /* clean up and exit */ ++extern void refuse(); /* clean up and exit */ ++#endif + extern char *xgets(); /* fgets() on steroids */ + extern char *split_at(); /* strchr() and split */ + extern unsigned long dot_quad_addr(); /* restricted inet_addr() */ +@@ -121,28 +134,47 @@ + * host_info structures serve as caches for the lookup results. + */ + +-extern char *eval_user(); /* client user */ +-extern char *eval_hostname(); /* printable hostname */ +-extern char *eval_hostaddr(); /* printable host address */ +-extern char *eval_hostinfo(); /* host name or address */ +-extern char *eval_client(); /* whatever is available */ +-extern char *eval_server(); /* whatever is available */ ++#ifdef __STDC__ ++extern char *eval_user(struct request_info *); /* client user */ ++extern char *eval_hostname(struct host_info *); /* printable hostname */ ++extern char *eval_hostaddr(struct host_info *); /* printable host address */ ++extern char *eval_hostinfo(struct host_info *); /* host name or address */ ++extern char *eval_client(struct request_info *); /* whatever is available */ ++extern char *eval_server(struct request_info *); /* whatever is available */ ++#else ++extern char *eval_user(); /* client user */ ++extern char *eval_hostname(); /* printable hostname */ ++extern char *eval_hostaddr(); /* printable host address */ ++extern char *eval_hostinfo(); /* host name or address */ ++extern char *eval_client(); /* whatever is available */ ++extern char *eval_server(); /* whatever is available */ ++#endif + #define eval_daemon(r) ((r)->daemon) /* daemon process name */ + #define eval_pid(r) ((r)->pid) /* process id */ + + /* Socket-specific methods, including DNS hostname lookups. */ + +-extern void sock_host(); /* look up endpoint addresses */ +-extern void sock_hostname(); /* translate address to hostname */ +-extern void sock_hostaddr(); /* address to printable address */ ++#ifdef __STDC__ ++extern void sock_host(struct request_info *); /* look up endpoint addresses */ ++extern void sock_hostname(struct host_info *); /* translate address to hostname */ ++extern void sock_hostaddr(struct host_info *); /* address to printable address */ ++#else ++extern void sock_host(); /* look up endpoint addresses */ ++extern void sock_hostname(); /* translate address to hostname */ ++extern void sock_hostaddr(); /* address to printable address */ ++#endif + #define sock_methods(r) \ + { (r)->hostname = sock_hostname; (r)->hostaddr = sock_hostaddr; } + + /* The System V Transport-Level Interface (TLI) interface. */ + + #if defined(TLI) || defined(PTX) || defined(TLI_SEQUENT) ++#ifdef __STDC__ ++extern void tli_host(struct request_info *); /* look up endpoint addresses etc. */ ++#else + extern void tli_host(); /* look up endpoint addresses etc. */ + #endif ++#endif + + /* + * Problem reporting interface. Additional file/line context is reported +@@ -182,42 +214,70 @@ + * behavior. + */ + +-extern void process_options(); /* execute options */ ++extern void process_options(char *, struct request_info *); /* execute options */ + extern int dry_run; /* verification flag */ + + /* Bug workarounds. */ + + #ifdef INET_ADDR_BUG /* inet_addr() returns struct */ + #define inet_addr fix_inet_addr ++#ifdef __STDC__ ++extern long fix_inet_addr(char *); ++#else + extern long fix_inet_addr(); + #endif ++#endif + + #ifdef BROKEN_FGETS /* partial reads from sockets */ + #define fgets fix_fgets ++#ifdef __STDC__ ++extern char *fix_fgets(char *, int, FILE *); ++#else + extern char *fix_fgets(); + #endif ++#endif + + #ifdef RECVFROM_BUG /* no address family info */ + #define recvfrom fix_recvfrom ++#ifdef __STDC__ ++extern int fix_recvfrom(int, char *, int, int, struct sockaddr *, int); ++#else + extern int fix_recvfrom(); + #endif ++#endif + + #ifdef GETPEERNAME_BUG /* claims success with UDP */ + #define getpeername fix_getpeername ++#ifdef __STDC__ ++extern int fix_getpeername(int, struct sockaddr *, int*); ++#else + extern int fix_getpeername(); + #endif ++#endif + + #ifdef SOLARIS_24_GETHOSTBYNAME_BUG /* lists addresses as aliases */ + #define gethostbyname fix_gethostbyname ++#ifdef __STDC__ ++extern struct hostent *fix_gethostbyname(char *, char *); ++#else + extern struct hostent *fix_gethostbyname(); + #endif ++#endif + + #ifdef USE_STRSEP /* libc calls strtok() */ + #define strtok fix_strtok ++#ifdef __STDC__ ++extern char *fix_strtok(char *, char *); ++#else + extern char *fix_strtok(); + #endif ++#endif + + #ifdef LIBC_CALLS_STRTOK /* libc calls strtok() */ + #define strtok my_strtok ++#ifdef __STDC__ ++extern char *my_strtok(char *, char *); ++#else + extern char *my_strtok(); + #endif ++#endif +--- scaffold.c_orig 2002-04-06 08:32:26.000000000 +0200 ++++ scaffold.c 2002-04-06 08:32:50.000000000 +0200 +@@ -40,7 +40,6 @@ + */ + int allow_severity = SEVERITY; + int deny_severity = LOG_WARNING; +-int rfc931_timeout = RFC931_TIMEOUT; + + /* dup_hostent - create hostent in one memory block */ + +@@ -324,16 +323,6 @@ + exit(0); + } + +-/* dummy function to intercept the real rfc931() */ +- +-/* ARGSUSED */ +- +-void rfc931(request) +-struct request_info *request; +-{ +- strcpy(request->user, unknown); +-} +- + /* check_path - examine accessibility */ + + int check_path(path, st) diff --git a/sys-apps/tcp-wrappers/tcp-wrappers-7.6-r4.ebuild b/sys-apps/tcp-wrappers/tcp-wrappers-7.6-r4.ebuild new file mode 100644 index 000000000000..12dcc01e64c1 --- /dev/null +++ b/sys-apps/tcp-wrappers/tcp-wrappers-7.6-r4.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2002 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# Maintainer: Achim Gottinger <achim@gentoo.org> +# $Header: /var/cvsroot/gentoo-x86/sys-apps/tcp-wrappers/tcp-wrappers-7.6-r4.ebuild,v 1.1 2002/04/06 06:40:22 gbevin Exp $ + +MY_P="tcp_wrappers_${PV}" +PATCH0="${MY_P}.dif" +PATCH1="${MY_P}-ipv6-1.6.diff.gz" +PATCH2="${MY_P}-stdc.diff" +S=${WORKDIR}/${MY_P} +DESCRIPTION="tcp wrappers" +SRC_URI="ftp://ftp.porcupine.org/pub/security/${MY_P}.tar.gz" + +DEPEND="virtual/glibc" + + +src_unpack() { + + unpack ${A} + + cd ${S}/ + patch -p0 < ${FILESDIR}/${PATCH0} || die + gzip -dc ${FILESDIR}/${PATCH1} | patch -p2 || die + patch -p0 < ${FILESDIR}/${PATCH2} || die + + cp Makefile Makefile.orig + sed -e "s/-O2/${CFLAGS}/" \ + -e "s:AUX_OBJ=.*:AUX_OBJ= \\\:" Makefile.orig > Makefile +} + +src_compile() { + + make ${MAKEOPTS} \ + REAL_DAEMON_DIR=/usr/sbin \ + linux || die +} + +src_install() { + + dosbin tcpd tcpdchk tcpdmatch safe_finger try-from + doman *.[358] + dosym hosts_access.5.gz /usr/share/man/man5/hosts.allow.5.gz + dosym hosts_access.5.gz /usr/share/man/man5/hosts.deny.5.gz + dolib.a libwrap.a + insinto /usr/include + doins tcpd.h + + dodoc BLURB CHANGES DISCLAIMER README* +} + |