From: Dominick Grift <dac.override@gmail.com>
To: selinux@tycho.nsa.gov
Subject: Re: [RFC] systemd the userspace object manager
Date: Fri, 21 Nov 2014 12:31:21 +0100 [thread overview]
Message-ID: <20141121113120.GA25417@e145.network2> (raw)
In-Reply-To: <546E52A3.8050802@quarksecurity.com>
[-- Attachment #1: Type: text/plain, Size: 1634 bytes --]
On Thu, Nov 20, 2014 at 03:44:19PM -0500, Joshua Brindle wrote:
>
> I can see why you'd want someone to be able to restart apache but not
> everything. Certainly having specific permissions is not the way to
> accomplish that.
>
> The rule above is kind of strange, permissions should not be equivalence
> classes, types should be, so it should be more like:
>
> allow <domain requesting restart> <derived service label> : init {start
> stop}
>
> right?
If only it were that simple. Here is my take on the whole thing:
Generally services are managed by "service" access checks on unit file types
allow webadmin webserverunitfile:service {start stop};
However these is also a concept of transient (in-memory) unit files, managing a service through a transient unit would work like:
allow user self:service {start stop};
or in the case of transient systemd units:
allow user systemd:service {stop start};
Then there is the system(d) class which also has the start, stop permissions associated with it (it is yet to be determined for what exactly)
In my policy systemd-logind does the following:
allow logind_t systemd:system(d) { start stop };
I suspect that this is required to spawn the systemd session daemon (at least)
It may or may not also be required for kexec (not sure as i havent tested that yet)
This is pretty much just all speculation though, in the sense that this is broadly what i see happening in the system, and it might not be the same as what *should* be happening
Instead its probably better to just read the systemd object manager code
--
Dominick Grift
[-- Attachment #2: Type: application/pgp-signature, Size: 648 bytes --]
next prev parent reply other threads:[~2014-11-21 11:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-18 16:38 [RFC] systemd the userspace object manager Christopher J. PeBenito
2014-11-18 18:48 ` Christopher J. PeBenito
2014-11-18 19:20 ` Dominick Grift
2014-11-20 13:52 ` Christopher J. PeBenito
2014-11-20 15:59 ` Dominick Grift
2014-11-20 20:44 ` Joshua Brindle
2014-11-21 11:31 ` Dominick Grift [this message]
2014-11-21 12:43 ` Joshua Brindle
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=20141121113120.GA25417@e145.network2 \
--to=dac.override@gmail.com \
--cc=selinux@tycho.nsa.gov \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.