From: Michael Orlitzky <mjo@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] rfc: ideas for fixing OpenRC checkpath issue
Date: Sat, 13 Jan 2018 15:48:10 -0500 [thread overview]
Message-ID: <731ea2b8-349d-28d4-72a6-3b9555f5bdf7@gentoo.org> (raw)
In-Reply-To: <20180110215437.GA3156@whubbs1.gaikai.biz>
On 01/10/2018 04:54 PM, William Hubbs wrote:
>
> What are we saying newpath should do differently than checkpath if I
> go this route?
I think this covers everything that we've talked about:
1. It should refuse to modify existing paths.
1.a. If newpath is called on an existing path, and if the requested
owner/permissions agree with the existing set, then do nothing.
This is expected when services restart without a reboot.
1.b. If newpath is called on an existing path, and if the desired
permissions differ from the existing set, then do nothing and
log a warning.
2. It should have a flag (say, --as=<user>[:group]) to make it run as
an unprivileged user. Basically a portable "su -c".
3. It should die if it's used in a directory that is writable by
anyone other than itself or root. (If it's feasible, we might want
to check the parent directories all the way up to the root; if I can
write to "b", then I can write to "e" in /a/b/c/d/e.)
Since newpath can't modify existing paths, the aforementioned "--as"
flag will be needed to avoid this error.
And just to put it out there, this will probably make a lot of people
mad. It discourages you from doing things like setting FOO_USER=foo in
the conf.d file, because you can't "fix" the permissions on things like
/var/log/foo.log if the value of $FOO_USER ever changes. That was
inherently unsafe anyway, but I'll eat my shorts if nobody complains.
(User variables, or RC_SVCNAME, should still work fine work multiple
instances.)
next prev parent reply other threads:[~2018-01-13 20:48 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-10 0:07 [gentoo-dev] rfc: ideas for fixing OpenRC checkpath issue William Hubbs
2018-01-10 1:19 ` Michael Orlitzky
2018-01-10 18:04 ` William Hubbs
2018-01-10 20:25 ` Michael Orlitzky
2018-01-10 21:54 ` William Hubbs
2018-01-13 20:48 ` Michael Orlitzky [this message]
2018-01-17 15:21 ` William Hubbs
2018-01-17 15:41 ` Michael Orlitzky
2018-01-17 17:14 ` William Hubbs
2018-01-19 0:19 ` Michael Orlitzky
2018-01-20 0:16 ` William Hubbs
2018-01-20 0:53 ` Michael Orlitzky
2018-01-20 1:14 ` William Hubbs
2018-01-20 1:20 ` Michael Orlitzky
2018-01-10 18:17 ` Kristian Fiskerstrand
2018-01-12 16:33 ` Michael Orlitzky
2018-01-10 22:18 ` James Le Cuirot
2018-01-10 23:31 ` 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=731ea2b8-349d-28d4-72a6-3b9555f5bdf7@gentoo.org \
--to=mjo@gentoo.org \
--cc=gentoo-dev@lists.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