svn commit: r312105 - head/usr.sbin/inetd
Ngie Cooper
ngie at FreeBSD.org
Sat Jan 14 01:37:05 UTC 2017
Author: ngie
Date: Sat Jan 14 01:37:03 2017
New Revision: 312105
URL: https://svnweb.freebsd.org/changeset/base/312105
Log:
Conditionalize libwrap support into inetd based on MK_TCP_WRAPPERS
This will allow inetd to stand by itself without libwrap.
MFC after: 2 weeks
Relnotes: yes
Reviewed by: hrs (earlier version)
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D9056
Modified:
head/usr.sbin/inetd/Makefile
head/usr.sbin/inetd/inetd.c
Modified: head/usr.sbin/inetd/Makefile
==============================================================================
--- head/usr.sbin/inetd/Makefile Sat Jan 14 01:08:04 2017 (r312104)
+++ head/usr.sbin/inetd/Makefile Sat Jan 14 01:37:03 2017 (r312105)
@@ -16,7 +16,12 @@ CFLAGS+= -DLOGIN_CAP
CFLAGS+= -DINET6
.endif
-LIBADD= util wrap
+LIBADD= util
+
+.if ${MK_TCP_WRAPPERS} != "no"
+CFLAGS+= -DLIBWRAP
+LIBADD+= wrap
+.endif
# XXX for src/release/picobsd
.if !defined(RELEASE_CRUNCH)
Modified: head/usr.sbin/inetd/inetd.c
==============================================================================
--- head/usr.sbin/inetd/inetd.c Sat Jan 14 01:08:04 2017 (r312104)
+++ head/usr.sbin/inetd/inetd.c Sat Jan 14 01:37:03 2017 (r312105)
@@ -336,9 +336,11 @@ main(int argc, char **argv)
#ifdef LOGIN_CAP
login_cap_t *lc = NULL;
#endif
+#ifdef LIBWRAP
struct request_info req;
int denied;
char *service = NULL;
+#endif
struct sockaddr_storage peer;
int i;
struct addrinfo hints, *res;
@@ -748,6 +750,7 @@ main(int argc, char **argv)
_exit(0);
}
}
+#ifdef LIBWRAP
if (ISWRAP(sep)) {
inetd_setproctitle("wrapping", ctrl);
service = sep->se_server_name ?
@@ -776,6 +779,7 @@ main(int argc, char **argv)
(whichaf(&req) == AF_INET6) ? "6" : "");
}
}
+#endif
if (sep->se_bi) {
(*sep->se_bi->bi_fn)(ctrl, sep);
} else {
More information about the svn-src-head
mailing list