From 609b7b269d7146662990e390ab542ed383be1ac5 Mon Sep 17 00:00:00 2001 From: Enji Cooper Date: Wed, 19 Apr 2017 20:45:46 +0000 Subject: [PATCH] Add a knob, WITH*_RPCBIND_WARMSTART_SUPPORT, to allow the end-user to build rpcbind(8) with/without warmstart support. The knob defaults to off to preserve POLA for the feature. See rpcbind(8) for more details about the warmstart feature. MFC after: 7 weeks Relnotes: yes Sponsored by: Dell EMC Isilon --- share/mk/src.opts.mk | 1 + tools/build/options/WITH_RPCBIND_WARMSTART_SUPPORT | 4 ++++ usr.sbin/rpcbind/Makefile | 4 ++++ 3 files changed, 9 insertions(+) create mode 100644 tools/build/options/WITH_RPCBIND_WARMSTART_SUPPORT diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 820991328939..857061c8bfc8 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -186,6 +186,7 @@ __DEFAULT_NO_OPTIONS = \ OFED \ OPENLDAP \ REPRODUCIBLE_BUILD \ + RPCBIND_WARMSTART_SUPPORT \ SHARED_TOOLCHAIN \ SORT_THREADS \ SVN \ diff --git a/tools/build/options/WITH_RPCBIND_WARMSTART_SUPPORT b/tools/build/options/WITH_RPCBIND_WARMSTART_SUPPORT new file mode 100644 index 000000000000..e1209e88fe01 --- /dev/null +++ b/tools/build/options/WITH_RPCBIND_WARMSTART_SUPPORT @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to build +.Xr rpcbind 8 +with warmstart support. diff --git a/usr.sbin/rpcbind/Makefile b/usr.sbin/rpcbind/Makefile index 0efb665b2a98..57907d3be871 100644 --- a/usr.sbin/rpcbind/Makefile +++ b/usr.sbin/rpcbind/Makefile @@ -14,6 +14,10 @@ CFLAGS+= -DPORTMAP CFLAGS+= -DINET6 .endif +.if ${MK_RPCBIND_WARMSTART_SUPPORT} != "no" +CFLAGS+= -DWARMSTART +.endif + .if ${MK_TCP_WRAPPERS} != "no" CFLAGS+= -DLIBWRAP LIBADD+= wrap