summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ypserv/yp_main.c
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1996-02-24 22:01:48 +0000
committerwpaul <wpaul@FreeBSD.org>1996-02-24 22:01:48 +0000
commitad0849d8900b9f782546a46918ebe65e3c52e43b (patch)
treed9a4d7f7d861b659a03bde9ec6da98d6f55f8653 /usr.sbin/ypserv/yp_main.c
parent8a2d37b3e57ef2cb34c084a48c2a9ec75d6774fc (diff)
downloadFreeBSD-src-ad0849d8900b9f782546a46918ebe65e3c52e43b.zip
FreeBSD-src-ad0849d8900b9f782546a46918ebe65e3c52e43b.tar.gz
Add real securenets support. By default, ypserv now uses /var/yp/securenets
in the same was as the SunOS ypserv (same format, described in ypserv man page). If the user wants tcpwrapper style access control, they can recompile ypserv to use that instead. This way we get securenets without having to ship libwrap.a and tcpd.h with core FreeBSD distribution. If /var/yp/securenets doesn't exist, ypserv allows all connections.
Diffstat (limited to 'usr.sbin/ypserv/yp_main.c')
-rw-r--r--usr.sbin/ypserv/yp_main.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/usr.sbin/ypserv/yp_main.c b/usr.sbin/ypserv/yp_main.c
index 94956b7..17296dc 100644
--- a/usr.sbin/ypserv/yp_main.c
+++ b/usr.sbin/ypserv/yp_main.c
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: yp_main.c,v 1.1.1.1 1995/12/16 20:54:17 wpaul Exp $
+ * $Id: yp_main.c,v 1.2 1995/12/23 21:35:32 wpaul Exp $
*/
/*
@@ -65,7 +65,7 @@
#define _RPCSVC_CLOSEDOWN 120
#ifndef lint
-static char rcsid[] = "$Id: yp_main.c,v 1.1.1.1 1995/12/16 20:54:17 wpaul Exp $";
+static char rcsid[] = "$Id: yp_main.c,v 1.2 1995/12/23 21:35:32 wpaul Exp $";
#endif /* not lint */
int _rpcpmstart; /* Started by a port monitor ? */
static int _rpcfdtype;
@@ -147,6 +147,11 @@ static void reaper(sig)
{
int status;
+ if (sig == SIGHUP) {
+ load_securenets();
+ return;
+ }
+
if (sig == SIGCHLD) {
while (wait3(&status, WNOHANG, NULL) > 0)
children--;
@@ -223,6 +228,8 @@ main(argc, argv)
}
}
+ load_securenets();
+
if (getsockname(0, (struct sockaddr *)&saddr, &asize) == 0) {
int ssize = sizeof (int);
OpenPOWER on IntegriCloud