PR/6835: Greg A. Woods: Various problems with tcpdchk

- fakelog.c contains extra va_arg
	- fix netgroup const problem and remove WARNS flag from Makefile
	- use CFLAGS from libwrap
This commit is contained in:
christos 1999-01-18 18:01:26 +00:00
parent e1849b79b1
commit ee880a75bf
3 changed files with 18 additions and 15 deletions

View File

@ -1,5 +1,4 @@
# $NetBSD: Makefile,v 1.6 1998/03/05 18:03:35 christos Exp $
#
# $Netbsd$
PROG= tcpdchk
SRCS= tcpdchk.c fakelog.c inetcf.c scaffold.c percent_m.c
@ -8,10 +7,7 @@ LDADD= -lwrap
DPADD= ${LIBWRAP}
CPPFLAGS+= -I${.CURDIR}/../../lib/libwrap
CPPFLAGS+=-DFACILITY=LOG_AUTHPRIV -DSEVERITY=LOG_INFO -DPARANOID
CPPFLAGS+=-DREAL_DAEMON_DIR=\"/usr/libexec\" -DHOSTS_ACCESS -DDAEMON_UMASK=022
CPPFLAGS+=-DRFC931_TIMEOUT=10 -DALWAYS_HOSTNAME -DSYS_ERRLIST_DEFINED
CPPFLAGS+=-DHOSTS_ALLOW=\"/etc/hosts.allow\" -DHOSTS_DENY=\"/etc/hosts.deny\"
CPPFLAGS+=-DPROCESS_OPTIONS
.include "${.CURDIR}/../../lib/libwrap/Makefile.cflags"
.include <bsd.prog.mk>

View File

@ -1,4 +1,4 @@
/* $NetBSD: fakelog.c,v 1.2 1997/10/11 21:41:36 christos Exp $ */
/* $NetBSD: fakelog.c,v 1.3 1999/01/18 18:01:26 christos Exp $ */
/*
* This module intercepts syslog() library calls and redirects their output
@ -12,7 +12,7 @@
#if 0
static char sccsid[] = "@(#) fakelog.c 1.3 94/12/28 17:42:21";
#else
__RCSID("$NetBSD: fakelog.c,v 1.2 1997/10/11 21:41:36 christos Exp $");
__RCSID("$NetBSD: fakelog.c,v 1.3 1999/01/18 18:01:26 christos Exp $");
#endif
#endif
@ -73,7 +73,6 @@ syslog(va_alist)
#else
va_start(ap, fmt);
#endif
fmt = va_arg(ap, char *);
vsyslog(severity, fmt, ap);
va_end(ap);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: tcpdchk.c,v 1.4 1997/10/17 13:49:49 lukem Exp $ */
/* $NetBSD: tcpdchk.c,v 1.5 1999/01/18 18:01:26 christos Exp $ */
/*
* tcpdchk - examine all tcpd access control rules and inetd.conf entries
@ -21,7 +21,7 @@
#if 0
static char sccsid[] = "@(#) tcpdchk.c 1.7 96/02/11 17:01:34";
#else
__RCSID("$NetBSD: tcpdchk.c,v 1.4 1997/10/17 13:49:49 lukem Exp $");
__RCSID("$NetBSD: tcpdchk.c,v 1.5 1999/01/18 18:01:26 christos Exp $");
#endif
#endif
@ -54,6 +54,14 @@ __RCSID("$NetBSD: tcpdchk.c,v 1.4 1997/10/17 13:49:49 lukem Exp $");
#include "inetcf.h"
#include "scaffold.h"
#ifdef NO_NETGRENT
/* SCO has no *netgrent() support */
#else
# ifdef NETGROUP
# include <netgroup.h>
# endif
#endif
/*
* Stolen from hosts_access.c...
*/
@ -419,9 +427,9 @@ char *pat;
/* SCO has no *netgrent() support */
#else
#ifdef NETGROUP
char *machinep;
char *userp;
char *domainp;
const char *machinep;
const char *userp;
const char *domainp;
setnetgrent(pat + 1);
if (getnetgrent(&machinep, &userp, &domainp) == 0)