Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/inetd PR bin/56963 Mark Davies: inetd not configure...



details:   https://anonhg.NetBSD.org/src/rev/16f64b37a679
branches:  trunk
changeset: 368878:16f64b37a679
user:      dholland <dholland%NetBSD.org@localhost>
date:      Wed Aug 10 03:35:38 2022 +0000

description:
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...

diffstat:

 usr.sbin/inetd/Makefile |   5 ++++-
 usr.sbin/inetd/inetd.c  |   9 ++-------
 usr.sbin/inetd/parse.c  |  10 +++++++---
 3 files changed, 13 insertions(+), 11 deletions(-)

diffs (88 lines):

diff -r eaa558429a72 -r 16f64b37a679 usr.sbin/inetd/Makefile
--- a/usr.sbin/inetd/Makefile   Wed Aug 10 01:16:38 2022 +0000
+++ b/usr.sbin/inetd/Makefile   Wed Aug 10 03:35:38 2022 +0000
@@ -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 @@
 # 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
diff -r eaa558429a72 -r 16f64b37a679 usr.sbin/inetd/inetd.c
--- a/usr.sbin/inetd/inetd.c    Wed Aug 10 01:16:38 2022 +0000
+++ b/usr.sbin/inetd/inetd.c    Wed Aug 10 03:35:38 2022 +0000
@@ -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 @@
 #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 @@
 #include <sys/socket.h>
 #include <sys/queue.h>
 
-
-#ifndef NO_RPC
-#define RPC
-#endif
-
 #include <net/if.h>
 
 #ifdef RPC
diff -r eaa558429a72 -r 16f64b37a679 usr.sbin/inetd/parse.c
--- a/usr.sbin/inetd/parse.c    Wed Aug 10 01:16:38 2022 +0000
+++ b/usr.sbin/inetd/parse.c    Wed Aug 10 03:35:38 2022 +0000
@@ -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 @@
 #include <syslog.h>
 #include <unistd.h>
 
+#ifdef RPC
+#include <rpc/rpc.h>
+#endif
+
 #include "inetd.h"
 
 static void    config(void);
@@ -321,7 +325,7 @@
                                if (sep->se_fd != -1)
                                        register_rpc(sep);
                        } else
-#endif
+#endif /* RPC */
                        {
                                if (sep->se_fd >= 0)
                                        close_sep(sep);



Home | Main Index | Thread Index | Old Index