rpcbind: Disable remote calls by default
Subsystems (3)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 rpcbind: Disable remote calls by default
FYI... I probably should have cc-ed this list as well...
steved.
-------- Forwarded Message --------
Subject: [Libtirpc-devel] [PATCH] rpcbind: Disable remote calls by default
Date: Thu, 26 Jul 2018 10:54:36 -0400
From: Steve Dickson <[email protected]>
To: Libtirpc-devel Mailing List <[email protected]>
Added a new configuration flag --enable-rmtcalls
which will be needed to enable the remote call
functionality.
This also stops rpcbind from opening up random
listening ports.
--- Makefile.am | 4 ++++ configure.ac | 4 ++++ src/rpcbind.c | 6 +++++- 3 files changed, 13 insertions(+), 1 deletion(-)
Makefile.am +4 -0
@@ -29,6 +29,10 @@ if LIBWRAP AM_CPPFLAGS += -DLIBWRAP endif +if RMTCALLS +AM_CPPFLAGS += -DRMTCALLS +endif + bin_PROGRAMS = rpcinfo sbin_PROGRAMS = rpcbind
configure.ac +4 -0
@@ -21,6 +21,10 @@ AC_ARG_ENABLE([warmstarts], AS_HELP_STRING([--enable-warmstarts], [Enables Warm Starts @<:@default=no@:>@])) AM_CONDITIONAL(WARMSTART, test x$enable_warmstarts = xyes) +AC_ARG_ENABLE([rmtcalls], + AS_HELP_STRING([--enable-rmtcalls], [Enables Remote Calls @<:@default=no@:>@])) +AM_CONDITIONAL(RMTCALLS, test x$enable_rmtcalls = xyes) + AC_ARG_WITH([statedir], AS_HELP_STRING([--with-statedir=ARG], [use ARG as state dir @<:@default=/var/run/rpcbind@:>@]) ,, [with_statedir=/var/run/rpcbind])
src/rpcbind.c +5 -1
@@ -794,12 +794,14 @@ got_socket: } }#endif + + +#ifdef RMTCALLS /* * rmtcall only supported on CLTS transports for now. */ if (nconf->nc_semantics ==NC_TPI_CLTS ) { status =create_rmtcall_fd (nconf); -#ifdef RPCBIND_DEBUG if (debugging) {if (status <0 ) {
@@ -813,6 +815,8 @@ got_socket: }#endif } +#endif +return (0 ); error:close (fd);
Signature · 10 lines
2.17.1 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Libtirpc-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libtirpc-devel
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 10 lines · Steve Dickson
=20
=20
=20Quoted 3 lines · Chuck Lever
=20
=20Quoted 1 line
On Jul 26, 2018, at 10:54 AM, Steve Dickson <[email protected]> =
Quoted 7 lines · wrote:
Quoted 7 lines
Quoted 7 lines
=20
Added a new configuration flag --enable-rmtcalls
which will be needed to enable the remote call
functionality.
=20
This also stops rpcbind from opening up random
listening ports.
Quoted 8 lines
Quoted 2 lines
=20
Hi, just curious. Why a build-time and not a run-time option?Cleaner and easier... with a command line option there is a lot more "stuff" you have to do... (aka man pages, usage messages, etc). =20
I've had customers complaining about this random listening port for=20 years and I only know of one app (rpcinfo) that used this feature so I'm fairly sure its not going to be missed...
No objection from me about making rmtcalls disappear.
But if you don't know of a valid use case for rmtcalls, it would be even cleaner to remove the rmtcalls feature altogether... if the default is "disabled" that means you are basically no longer testing it.
2 cents.
Quoted 23 lines
steved.
Quoted 22 lines
=20
=20Quoted 20 lines
Signed-off-by Steve Dickson <[email protected]>---
Makefile.am | 4 ++++ configure.ac | 4 ++++ src/rpcbind.c | 6 +++++- 3 files changed, 13 insertions(+), 1 deletion(-)=20
Makefile.am +0
-0@@ -29,6 +29,10 @@ if LIBWRAP
AM_CPPFLAGS+=3D -DLIBWRAP
endif
=20Makefile.am +4
-0+if RMTCALLS +AM_CPPFLAGS +=3D -DRMTCALLS +endif +
bin_PROGRAMS=3D rpcinfo
Quoted 8 lines
Quoted 8 lines
configure.ac AC_ARG_ENABLE([warmstarts], · line 21
Quoted 8 lines
sbin_PROGRAMS=3D rpcbind
=20configure.ac +0
-0@@ -21,6 +21,10 @@ AC_ARG_ENABLE([warmstarts], AS_HELP_STRING([--enable-warmstarts], [Enables Warm Starts =
@<:@default=3Dno@:>@]))
Quoted 4 lines
Quoted 4 lines
configure.ac
Quoted 4 lines
configure.ac +0
-0AM_CONDITIONAL(WARMSTART, test x$enable_warmstarts =3D xyes)=20
configure.ac +2
-0+AC_ARG_ENABLE([rmtcalls], + AS_HELP_STRING([--enable-rmtcalls], [Enables Remote Calls =
@<:@default=3Dno@:>@]))
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
configure.ac +2
-0+AM_CONDITIONAL(RMTCALLS, test x$enable_rmtcalls =3D xyes) +AC_ARG_WITH([statedir],
AS_HELP_STRING([--with-statedir=3DARG], [use ARG as state dir =
@<:@default=3D/var/run/rpcbind@:>@])
Quoted 27 lines
Quoted 27 lines
Quoted 27 lines
,, [with_statedir=3D/var/run/rpcbind])
src/rpcbind.c +5
-1@@ -794,12 +794,14 @@ got_socket: } }#endif + + +#ifdef RMTCALLS /* * rmtcall only supported on CLTS transports for now. */ if (nconf->nc_semantics =3D=3D NC_TPI_CLTS) { status =3D create_rmtcall_fd(nconf); -#ifdef RPCBIND_DEBUG if (debugging) {if (status <0 ) {@@ -813,6 +815,8 @@ got_socket: }#endif } +#endif +
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
src/rpcbind.c +0
-0return (0 );error:
close(fd);--=20
2.17.1
=20
=20
=
--------------------------------------------------------------------------=
----
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Libtirpc-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/libtirpc-devel
Quoted 6 lines
Quoted 6 lines
=20
--
Chuck Lever
=20
=20
=20
--
Chuck Lever
Quoted 26 lines · Chuck Lever
Quoted 18 lines · Steve Dickson
Quoted 11 lines · Chuck Lever
Quoted 10 lines · Steve Dickson
Added a new configuration flag --enable-rmtcalls
which will be needed to enable the remote call
functionality.This also stops rpcbind from opening up random
listening ports.Quoted 7 lines
Quoted 1 line
Hi, just curious. Why a build-time and not a run-time option?
Cleaner and easier... with a command line option there is a lot more "stuff" you have to do... (aka man pages, usage messages, etc).
I've had customers complaining about this random listening port for years and I only know of one app (rpcinfo) that used this feature so I'm fairly sure its not going to be missed...
Quoted 6 lines
No objection from me about making rmtcalls disappear.
But if you don't know of a valid use case for rmtcalls, it would be even cleaner to remove the rmtcalls feature altogether... if the default is "disabled" that means you are basically no longer testing it.
Well I was thinking it should be easily turn back on just in case it does breaks somebody's flux capacitor... If that is not the case we can rip it out down the road.
Quoted 2 lines
2 cents.
My 4 cents! :-)
steved.
Quoted 94 lines
Quoted 88 lines
steved.
Quoted 85 lines
Quoted 67 lines
Signed-off-by Steve Dickson <[email protected]>---
Makefile.am | 4 ++++ configure.ac | 4 ++++ src/rpcbind.c | 6 +++++- 3 files changed, 13 insertions(+), 1 deletion(-)Makefile.am +0
-0@@ -29,6 +29,10 @@ if LIBWRAP
AM_CPPFLAGS+= -DLIBWRAP
endifMakefile.am +4
-0+if RMTCALLS +AM_CPPFLAGS += -DRMTCALLS +endif +
bin_PROGRAMS= rpcinfosbin_PROGRAMS= rpcbindconfigure.ac +4
-0@@ -21,6 +21,10 @@ AC_ARG_ENABLE([warmstarts], AS_HELP_STRING([--enable-warmstarts], [Enables Warm Starts @<:@default=no@:>@])) AM_CONDITIONAL(WARMSTART, test x$enable_warmstarts = xyes) +AC_ARG_ENABLE([rmtcalls], + AS_HELP_STRING([--enable-rmtcalls], [Enables Remote Calls @<:@default=no@:>@])) +AM_CONDITIONAL(RMTCALLS, test x$enable_rmtcalls = xyes) + AC_ARG_WITH([statedir], AS_HELP_STRING([--with-statedir=ARG], [use ARG as state dir @<:@default=/var/run/rpcbind@:>@]) ,, [with_statedir=/var/run/rpcbind])src/rpcbind.c +5
-1@@ -794,12 +794,14 @@ got_socket: } }#endif + + +#ifdef RMTCALLS /* * rmtcall only supported on CLTS transports for now. */ if (nconf->nc_semantics ==NC_TPI_CLTS ) { status =create_rmtcall_fd (nconf); -#ifdef RPCBIND_DEBUG if (debugging) {if (status <0 ) {@@ -813,6 +815,8 @@ got_socket: }#endif } +#endif +return (0 );error:
Quoted 12 lines
close(fd);Signature · 10 lines
2.17.1 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Libtirpc-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libtirpc-devel--
Chuck Lever--
Chuck Lever