Module Name: src Committed By: dholland Date: Wed Aug 10 03:35:39 UTC 2022
Modified Files: src/usr.sbin/inetd: Makefile inetd.c parse.c Log Message: PR bin/56963 Mark Davies: inetd not configured for rpc Instead of using negative flags to turn on positive flags, set -DRPC in the makefile. Corrects a problem where the SunRPC code in parse.c was accidentally left disabled. This is a prime example of why we don't like negative flags... To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/usr.sbin/inetd/Makefile cvs rdiff -u -r1.139 -r1.140 src/usr.sbin/inetd/inetd.c cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/inetd/parse.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.sbin/inetd/Makefile diff -u src/usr.sbin/inetd/Makefile:1.30 src/usr.sbin/inetd/Makefile:1.31 --- src/usr.sbin/inetd/Makefile:1.30 Tue Oct 12 19:08:04 2021 +++ src/usr.sbin/inetd/Makefile Wed Aug 10 03:35:38 2022 @@ -1,5 +1,5 @@ # from: @(#)Makefile 8.1 (Berkeley) 6/6/93 -# $NetBSD: Makefile,v 1.30 2021/10/12 19:08:04 christos Exp $ +# $NetBSD: Makefile,v 1.31 2022/08/10 03:35:38 dholland Exp $ .include <bsd.own.mk> @@ -15,6 +15,9 @@ WARNS= 6 # Enables debug printouts when in debug mode CPPFLAGS+=-DDEBUG_ENABLE +# Enables SunRPC support +CPPFLAGS+=-DRPC + CPPFLAGS+=-DLIBWRAP # Use LIBWRAP_INTERNAL for libwrap checking of inetd's `internal' services. #CPPFLAGS+=-DLIBWRAP_INTERNAL Index: src/usr.sbin/inetd/inetd.c diff -u src/usr.sbin/inetd/inetd.c:1.139 src/usr.sbin/inetd/inetd.c:1.140 --- src/usr.sbin/inetd/inetd.c:1.139 Sun Oct 17 04:14:49 2021 +++ src/usr.sbin/inetd/inetd.c Wed Aug 10 03:35:38 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: inetd.c,v 1.139 2021/10/17 04:14:49 ryo Exp $ */ +/* $NetBSD: inetd.c,v 1.140 2022/08/10 03:35:38 dholland Exp $ */ /*- * Copyright (c) 1998, 2003 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19 #if 0 static char sccsid[] = "@(#)inetd.c 8.4 (Berkeley) 4/13/94"; #else -__RCSID("$NetBSD: inetd.c,v 1.139 2021/10/17 04:14:49 ryo Exp $"); +__RCSID("$NetBSD: inetd.c,v 1.140 2022/08/10 03:35:38 dholland Exp $"); #endif #endif /* not lint */ @@ -193,11 +193,6 @@ __RCSID("$NetBSD: inetd.c,v 1.139 2021/1 #include <sys/socket.h> #include <sys/queue.h> - -#ifndef NO_RPC -#define RPC -#endif - #include <net/if.h> #ifdef RPC Index: src/usr.sbin/inetd/parse.c diff -u src/usr.sbin/inetd/parse.c:1.3 src/usr.sbin/inetd/parse.c:1.4 --- src/usr.sbin/inetd/parse.c:1.3 Sun May 22 11:27:37 2022 +++ src/usr.sbin/inetd/parse.c Wed Aug 10 03:35:38 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: parse.c,v 1.3 2022/05/22 11:27:37 andvar Exp $ */ +/* $NetBSD: parse.c,v 1.4 2022/08/10 03:35:38 dholland Exp $ */ /*- * Copyright (c) 1998, 2003 The NetBSD Foundation, Inc. @@ -64,7 +64,7 @@ #if 0 static char sccsid[] = "@(#)inetd.c 8.4 (Berkeley) 4/13/94"; #else -__RCSID("$NetBSD: parse.c,v 1.3 2022/05/22 11:27:37 andvar Exp $"); +__RCSID("$NetBSD: parse.c,v 1.4 2022/08/10 03:35:38 dholland Exp $"); #endif #endif /* not lint */ @@ -91,6 +91,10 @@ __RCSID("$NetBSD: parse.c,v 1.3 2022/05/ #include <syslog.h> #include <unistd.h> +#ifdef RPC +#include <rpc/rpc.h> +#endif + #include "inetd.h" static void config(void); @@ -321,7 +325,7 @@ config(void) if (sep->se_fd != -1) register_rpc(sep); } else -#endif +#endif /* RPC */ { if (sep->se_fd >= 0) close_sep(sep);