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...
This commit is contained in:
parent
440d029565
commit
9178dcce36
|
@ -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
|
||||
|
|
|
@ -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, 1991, 1993, 1994\
|
|||
#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/10/17 04:14:49 ryo Exp $");
|
|||
#include <sys/socket.h>
|
||||
#include <sys/queue.h>
|
||||
|
||||
|
||||
#ifndef NO_RPC
|
||||
#define RPC
|
||||
#endif
|
||||
|
||||
#include <net/if.h>
|
||||
|
||||
#ifdef RPC
|
||||
|
|
|
@ -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/22 11:27:37 andvar Exp $");
|
|||
#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);
|
||||
|
|
Loading…
Reference in New Issue