From: NeilBrown <neilb@suse.com>
To: Steve Dickson <SteveD@redhat.com>
Cc: Mike Frysinger <vapier@gentoo.org>,
Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
libtirpc-devel@lists.sourceforge.net
Subject: Re: [Libtirpc-devel] [PATCH rpcbind v2] Move default state-dir to a subdirectory of /tmp
Date: Wed, 16 Nov 2016 12:34:37 +1100 [thread overview]
Message-ID: <8760noi4wi.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <ed1f4f4c-fda6-6909-baab-5fbde2a5bc6c@RedHat.com>
[-- Attachment #1: Type: text/plain, Size: 2023 bytes --]
On Wed, Nov 16 2016, Steve Dickson wrote:
> On 11/14/2016 02:05 AM, NeilBrown wrote:
>> rpcbind can save state in a file to allow restart without forgetting
>> about running services.
>>
>> The default location is currently "/tmp" which is
>> not ideal for system files. It is particularly unpleasant
>> to put simple files there rather than creating a directory
>> to contain them.
>>
>> On a modern Linux system it is preferable to use /run, and there it is
>> even more consistent with practice to use a subdirectory.
>>
>> This directory needs to be create one each boot, and while there are
>> tools (e.g. systemd-tmpfiles) which can do that it is cleaner to keep
>> rpcbind self-contained and have it create the directory.
>>
>> So change the default location to /tmp/rpcbind, and create that
>> directory. If a different user-id is used, we need to create
>> and chown the directory before dropping privileges. We do this
>> with care so avoid chowning the wrong thing by mistake.
>>
>> Signed-off-by: NeilBrown <neilb@suse.com>
>> ---
>>
>> hi,
>> I realized that I hadn't allowed for the fact that rpcbind changes
>> it's uid, and we need to mkdir and chown before that.
>> I've also reverted the move to /run, but moved to /tmp/rpcbind
>> instead. A subdirectory is a good idea, even in /tmp.
> I'm beginning to think put these files into a directory call /tmp/rpcbind
> is not a good idea... Because if something in /tmp is called rpcbind (like a
> debugging binary ;-) ) the mkdirs will silently fail which is not good.
>
> Here is what I would like to do.
>
> Move the directory into /run then create the /run/rpcbind when it
> does not exist... I think that should play nicely in both the
> systemd worlds and non-systemd worlds
>
> Thoughts?
/var/run rather than /run seems to be a safer universal default.
Linux distros can run ./configure --with-statedir=/run/rcpbind
Otherwise, I think we are in agreement.
You want I should respin with /tmp/rpcbind -> /var/run/rpcbind ??
Thanks,
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 800 bytes --]
next prev parent reply other threads:[~2016-11-16 1:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-11 3:36 [PATCH rpcbind] Move default state-dir to /run/rpcbind NeilBrown
2016-11-11 21:00 ` [Libtirpc-devel] " Mike Frysinger
2016-11-13 23:09 ` NeilBrown
2016-11-14 7:05 ` [PATCH rpcbind v2] Move default state-dir to a subdirectory of /tmp NeilBrown
2016-11-15 19:54 ` [Libtirpc-devel] " Steve Dickson
2016-11-16 1:34 ` NeilBrown [this message]
2016-11-16 10:17 ` Steve Dickson
2016-11-14 19:12 ` [Libtirpc-devel] [PATCH rpcbind] Move default state-dir to /run/rpcbind Mike Frysinger
2016-11-14 19:26 ` Steve Dickson
2016-11-14 20:12 ` Mike Frysinger
[not found] ` <669e90b0-6011-7b82-4e37-f1e3bf292026@RedHat.com>
2016-11-15 6:36 ` NeilBrown
2016-11-15 16:02 ` Steve Dickson
2016-11-15 20:28 ` NeilBrown
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=8760noi4wi.fsf@notabene.neil.brown.name \
--to=neilb@suse.com \
--cc=SteveD@redhat.com \
--cc=libtirpc-devel@lists.sourceforge.net \
--cc=linux-nfs@vger.kernel.org \
--cc=vapier@gentoo.org \
/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;
as well as URLs for NNTP newsgroup(s).