From: NeilBrown <neilb@suse.com>
To: Steve Dickson <SteveD@RedHat.com>,
Michael Orlitzky <michael@orlitzky.com>,
linux-nfs@vger.kernel.org
Subject: Re: [PATCH 1/1] autotools: install rpcbind to --sbindir.
Date: Tue, 01 Aug 2017 15:22:39 +1000 [thread overview]
Message-ID: <87efsvvp40.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <ab9fa53d-8301-f6e8-50d5-0ccddd2dccb6@RedHat.com>
[-- Attachment #1: Type: text/plain, Size: 3437 bytes --]
On Mon, Jul 31 2017, Steve Dickson wrote:
> On 07/28/2017 09:52 AM, Michael Orlitzky wrote:
>> 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(-)
> A couple things... You are missing a Signed-off-by line
>
> Also I would like some more input from others about
> changing the default install directory to sbin
>
> Anybody have a problem with this?
In SUSE we run
./configure --bindir=/sbin .....
for rpcbind.
So: no, we do not have a problem with this. Nor do I personally.
This came up before in the thread starting
https://www.spinics.net/lists/linux-nfs/msg60349.html
but didn't quite get resolved for some reason that I don't recall.
Thanks,
NeilBrown
>
> steved.
>>
>> diff --git a/Makefile.am b/Makefile.am
>> index 43c2710..c160a95 100644
>> --- a/Makefile.am
>> +++ b/Makefile.am
>> @@ -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 \
>> diff --git a/configure.ac b/configure.ac
>> index 3790310..359a418 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -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])
>> diff --git a/systemd/rpcbind.service.in b/systemd/rpcbind.service.in
>> index 03a9e0b..f8cfa9f 100644
>> --- a/systemd/rpcbind.service.in
>> +++ b/systemd/rpcbind.service.in
>> @@ -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
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2017-08-01 5:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-28 13:52 [PATCH 0/1] rpcbind: install the rpcbind program to sbindir Michael Orlitzky
2017-07-28 13:52 ` [PATCH 1/1] autotools: install rpcbind to --sbindir Michael Orlitzky
2017-07-31 14:55 ` Steve Dickson
2017-08-01 5:22 ` NeilBrown [this message]
2017-08-01 15:27 ` Steve Dickson
2017-08-01 18:47 ` Michael Orlitzky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87efsvvp40.fsf@notabene.neil.brown.name \
--to=neilb@suse.com \
--cc=SteveD@RedHat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=michael@orlitzky.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox