diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2014-03-23 02:42:48 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2014-03-23 02:42:48 +0000 |
commit | 31bfd98d18e7faba4ece1cf14e1b668a12b450d7 (patch) | |
tree | 72c78527e96ceeb5e6a5e293876fa60715944438 | |
parent | 9a5c26e1497da770073118645eb98236a4c04548 (diff) |
stop using libwrap. ok deraadt
-rw-r--r-- | games/hunt/huntd/Makefile | 4 | ||||
-rw-r--r-- | games/hunt/huntd/answer.c | 13 | ||||
-rw-r--r-- | games/hunt/huntd/driver.c | 22 | ||||
-rw-r--r-- | games/hunt/huntd/huntd.6 | 12 |
4 files changed, 5 insertions, 46 deletions
diff --git a/games/hunt/huntd/Makefile b/games/hunt/huntd/Makefile index d096bd8f9f1..1afb9e239e1 100644 --- a/games/hunt/huntd/Makefile +++ b/games/hunt/huntd/Makefile @@ -1,12 +1,10 @@ # $NetBSD: Makefile,v 1.1 1997/10/04 09:11:21 mrg Exp $ -# $OpenBSD: Makefile,v 1.4 1999/03/14 02:07:30 pjanzen Exp $ +# $OpenBSD: Makefile,v 1.5 2014/03/23 02:42:47 tedu Exp $ PROG= huntd SRCS= answer.c conf.c draw.c driver.c execute.c expl.c \ extern.c makemaze.c shots.c terminal.c MAN= huntd.6 -LDADD+= -lwrap -DPADD+= ${LIBWRAP} .include "../../Makefile.inc" .include <bsd.prog.mk> diff --git a/games/hunt/huntd/answer.c b/games/hunt/huntd/answer.c index a0e98bb210d..998f21bb9ba 100644 --- a/games/hunt/huntd/answer.c +++ b/games/hunt/huntd/answer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: answer.c,v 1.11 2007/11/06 10:22:29 chl Exp $ */ +/* $OpenBSD: answer.c,v 1.12 2014/03/23 02:42:47 tedu Exp $ */ /* $NetBSD: answer.c,v 1.3 1997/10/10 16:32:50 lukem Exp $ */ /* * Copyright (c) 1983-2003, Regents of the University of California. @@ -37,7 +37,6 @@ #include <stdlib.h> #include <unistd.h> #include <stdio.h> -#include <tcpd.h> #include <syslog.h> #include <string.h> #include <sys/socket.h> @@ -67,7 +66,6 @@ answer_first() int newsock; socklen_t socklen; int flags; - struct request_info ri; struct spawn *sp; /* Answer the call to hunt: */ @@ -78,15 +76,6 @@ answer_first() return; } - /* Check for access permissions: */ - request_init(&ri, RQ_DAEMON, "huntd", RQ_FILE, newsock, 0); - fromhost(&ri); - if (hosts_access(&ri) == 0) { - logx(LOG_INFO, "rejected connection from %s", eval_client(&ri)); - close(newsock); - return; - } - /* Remember this spawning connection: */ sp = (struct spawn *)malloc(sizeof *sp); if (sp == NULL) { diff --git a/games/hunt/huntd/driver.c b/games/hunt/huntd/driver.c index 078779b2192..905c19d33b9 100644 --- a/games/hunt/huntd/driver.c +++ b/games/hunt/huntd/driver.c @@ -1,4 +1,4 @@ -/* $OpenBSD: driver.c,v 1.20 2013/08/29 20:22:15 naddy Exp $ */ +/* $OpenBSD: driver.c,v 1.21 2014/03/23 02:42:47 tedu Exp $ */ /* $NetBSD: driver.c,v 1.5 1997/10/20 00:37:16 lukem Exp $ */ /* * Copyright (c) 1983-2003, Regents of the University of California. @@ -41,7 +41,6 @@ #include <string.h> #include <unistd.h> #include <stdio.h> -#include <tcpd.h> #include <syslog.h> #include <netdb.h> #include <sys/socket.h> @@ -1007,7 +1006,6 @@ send_stats() int s; struct sockaddr_in sockstruct; socklen_t socklen; - struct request_info ri; int flags; /* Accept a connection to the statistics socket: */ @@ -1020,15 +1018,6 @@ send_stats() return; } - /* Check for access permissions: */ - request_init(&ri, RQ_DAEMON, "huntd", RQ_FILE, s, 0); - fromhost(&ri); - if (hosts_access(&ri) == 0) { - logx(LOG_INFO, "rejected connection from %s", eval_client(&ri)); - close(s); - return; - } - /* Don't allow the writes to block: */ flags = fcntl(s, F_GETFL, 0); flags |= O_NDELAY; @@ -1152,10 +1141,7 @@ handle_wkport(fd) socklen_t fromlen; u_int16_t query; u_int16_t response; - struct request_info ri; - request_init(&ri, RQ_DAEMON, "huntd", RQ_FILE, fd, 0); - fromhost(&ri); fromlen = sizeof fromaddr; if (recvfrom(fd, &query, sizeof query, 0, &fromaddr, &fromlen) == -1) { @@ -1173,12 +1159,6 @@ handle_wkport(fd) ntohs(((struct sockaddr_in *)&fromaddr)->sin_port)); #endif - /* Do we allow access? */ - if (hosts_access(&ri) == 0) { - logx(LOG_INFO, "rejected connection from %s", eval_client(&ri)); - return; - } - query = ntohs(query); switch (query) { diff --git a/games/hunt/huntd/huntd.6 b/games/hunt/huntd/huntd.6 index e88e2f2cfb0..1476bd90483 100644 --- a/games/hunt/huntd/huntd.6 +++ b/games/hunt/huntd/huntd.6 @@ -1,5 +1,5 @@ .\" $NetBSD: huntd.6,v 1.3 1998/01/09 08:03:42 perry Exp $ -.\" $OpenBSD: huntd.6,v 1.21 2008/10/02 22:58:22 jmc Exp $ +.\" $OpenBSD: huntd.6,v 1.22 2014/03/23 02:42:47 tedu Exp $ .\" .\" Hunt .\" Copyright (c) 1985 Conrad C. Huang, Gregory S. Couch, Kenneth C.R.C. Arnold @@ -9,7 +9,7 @@ .\" All rights reserved. The Berkeley software License Agreement .\" specifies the terms and conditions for redistribution. .\" -.Dd $Mdocdate: October 2 2008 $ +.Dd $Mdocdate: March 23 2014 $ .Dt HUNTD 6 .Os .Sh NAME @@ -105,13 +105,6 @@ If a hears the request, it sends back the port number for the .Nm hunt process to connect to. -.Pp -Regardless of how -.Nm -is started, it always checks incoming connections with -.Xr hosts_access 5 , -using a service name of -.Sq huntd . .Ss "CONFIGURATION" When .Nm @@ -277,7 +270,6 @@ Try 55000 for something reasonable .It Pa ./.hunt.conf .El .Sh SEE ALSO -.Xr hosts_options 5 , .Xr hunt 6 , .Xr inetd 8 .Sh AUTHORS |