rpcbind: install the rpcbind program to sbindir.
Subsystems (3)
v2 cover rpcbind: install the rpcbind program to sbindir.
According to its own man page, the rpcbind program "can only be started by the super-user." On systems where a distinction is made, it therefore makes sense to install rpcbind to the autotools sbindir rather than the regular bindir where it is currently installed.
The only difference between this and the first version of the patch is the addition of the Signed-off-by line in the commit message.
Michael Orlitzky (1):
autotools: install rpcbind to --sbindir.
Makefile.am | 3 ++- configure.ac | 6 +++--- systemd/rpcbind.service.in | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-)
Signature · 1 line
2.13.0
PATCH v2 1/1 autotools: install rpcbind to --sbindir.
According to its own man page, the rpcbind program "can only be started by the super-user." On systems where a distinction is made, it therefore makes sense to install rpcbind to the autotools sbindir rather than the regular bindir where it is currently installed. This is accomplished by three small changes:
1. Move rpcbind from bin_PROGRAMS to sbin_PROGRAMS in Makefile.am.
2. Change @_bindir@ to @_sbindir@ in the rpcbind systemd service file.
3. Tell configure.ac that it should substitute the value of $sbindir into @_sbindir@ instead of $bindir$ into @_bindir@.
The rpcinfo tool remains where it is, in bindir, since unprivileged users are able to usefully run it. This avoids forcing maintainers to choose between two bad options: hiding rpcinfo from unprivileged users, or installing a useless rpcbind for them.
--- Makefile.am | 3 ++- configure.ac | 6 +++--- systemd/rpcbind.service.in | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-)
Makefile.am +2 -1
@@ -29,7 +29,8 @@ if LIBWRAP AM_CPPFLAGS += -DLIBWRAP endif -bin_PROGRAMS = rpcbind rpcinfo +bin_PROGRAMS = rpcinfo +sbin_PROGRAMS = rpcbind rpcbind_SOURCES = \ src/check_bound.c \
configure.ac +3 -3
@@ -61,9 +61,9 @@ AC_SEARCH_LIBS([pthread_create], [pthread]) AC_CHECK_HEADERS([nss.h rpcsvc/mount.h]) -# make bindir available for substitution in config file +# make sbindir available for substitution in config file # 2 "evals" needed to expand variable names -AC_SUBST([_bindir]) -AC_CONFIG_COMMANDS_PRE([eval eval _bindir=$bindir]) +AC_SUBST([_sbindir]) +AC_CONFIG_COMMANDS_PRE([eval eval _sbindir=$sbindir]) AC_OUTPUT([Makefile systemd/rpcbind.service])
systemd/rpcbind.service.in +1 -1
@@ -12,7 +12,7 @@ After=rpcbind.socket [Service] Type=notify # distro can provide a drop-in adding EnvironmentFile=-/??? if needed. -ExecStart=@_bindir@/rpcbind $RPCBIND_OPTIONS -w -f +ExecStart=@_sbindir@/rpcbind $RPCBIND_OPTIONS -w -f [Install] WantedBy=multi-user.target
Signature · 1 line
2.13.0
Re: [PATCH v2 1/1] autotools: install rpcbind to --sbindir.
Quoted 11 lines · Michael Orlitzky
According to its own man page, the rpcbind program "can only be started by the super-user." On systems where a distinction is made, it therefore makes sense to install rpcbind to the autotools sbindir rather than the regular bindir where it is currently installed. This is accomplished by three small changes:
1. Move rpcbind from
bin_PROGRAMStosbin_PROGRAMSin Makefile.am.
2. Change @_bindir@ to @_sbindir@ in the rpcbind systemd service file.
3. Tell configure.ac that it should substitute the value of $sbindir into @_sbindir@ instead of $bindir$ into @_bindir@.
Quoted 6 lines
The rpcinfo tool remains where it is, in bindir, since unprivileged users are able to usefully run it. This avoids forcing maintainers to choose between two bad options: hiding rpcinfo from unprivileged users, or installing a useless rpcbind for them.
Signed-off-by Michael Orlitzky <[email protected]>
Committed....
steved.
Quoted 51 lines
--- Makefile.am | 3 ++- configure.ac | 6 +++--- systemd/rpcbind.service.in | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-)Makefile.am +2
-1@@ -29,7 +29,8 @@ if LIBWRAP AM_CPPFLAGS += -DLIBWRAP endif -bin_PROGRAMS = rpcbind rpcinfo +bin_PROGRAMS = rpcinfo +sbin_PROGRAMS = rpcbind rpcbind_SOURCES = \ src/check_bound.c \configure.ac +3
-3@@ -61,9 +61,9 @@ AC_SEARCH_LIBS([pthread_create], [pthread]) AC_CHECK_HEADERS([nss.h rpcsvc/mount.h]) -# make bindir available for substitution in config file +# make sbindir available for substitution in config file # 2 "evals" needed to expand variable names -AC_SUBST([_bindir]) -AC_CONFIG_COMMANDS_PRE([eval eval _bindir=$bindir]) +AC_SUBST([_sbindir]) +AC_CONFIG_COMMANDS_PRE([eval eval _sbindir=$sbindir]) AC_OUTPUT([Makefile systemd/rpcbind.service])systemd/rpcbind.service.in +1
-1@@ -12,7 +12,7 @@ After=rpcbind.socket [Service] Type=notify # distro can provide a drop-in adding EnvironmentFile=-/??? if needed. -ExecStart=@_bindir@/rpcbind $RPCBIND_OPTIONS -w -f +ExecStart=@_sbindir@/rpcbind $RPCBIND_OPTIONS -w -f [Install] WantedBy=multi-user.target