From: Ian Pilcher <arequipeno@gmail.com>
To: selinux@vger.kernel.org, Systemd <systemd-devel@lists.freedesktop.org>
Subject: Re: [systemd SELinux] system status permission
Date: Mon, 7 Oct 2019 13:31:07 -0500 [thread overview]
Message-ID: <4309d36c-d15c-1d7c-2e61-5d58e470c1cd@gmail.com> (raw)
In-Reply-To: <20191007170941.GD1088825@brutus.lan>
On 10/7/19 12:09 PM, Dominick Grift wrote:
>
> I tried it out with simple `systemctl status`
>
> Oct 07 19:04:21 myguest systemd[1]: Sent message type=method_return
> sender=org.freedesktop.systemd1 destination=n/a path=n/a
> interface=n/a member=n/a cookie=1 reply_cookie=1 signature=a{sv}
> error-name=n/a error-message=n/a Oct 07 19:04:21 myguest systemd[1]:
> SELinux access check
> scon=wheel.id:sysadm.role:systemctl.sysadm.subj:s0
> tcon=sys.id:sys.role:systemd.system.subj:s0 tclass=system perm=status
> path=(null) cmdline=: 0 Oct 07 19:04:21 myguest systemd[1]: Got
> message type=method_call sender=n/a
> destination=org.freedesktop.systemd1 path=/org/freedesktop/systemd1
> interface=org.freedesktop.DBus.Properties member=GetAll cookie=1
> reply_cookie=0 signature=s error-name=n/a error-message=n/a
>
> So the method "get all properties from systemd1" was called by
> running that, and that triggered a "system status" check
>
Thanks for checking this out. I does indeed seem that this check is
triggered by the 'systemctl status' command (or which I was previously
unaware). It isn't, however, triggered by 'systemctl status $UNIT';
that check looks like:
Oct 07 13:20:45 c7.penurio.us systemd[1]: SELinux access check
scon=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
tcon=unconfined_u:object_r:radvd_dynamic_unit_file_t:s0 tclass=service
perm=status path=/etc/systemd/system/radvd.service cmdline=systemctl
status radvd.service: 0
I.e. the target context type is that of the unit file.
Looks like this is going to be a dontaudit, since my service has no
business looking at the overall system state.
--
========================================================================
Ian Pilcher arequipeno@gmail.com
-------- "I grew up before Mark Zuckerberg invented friendship" --------
========================================================================
prev parent reply other threads:[~2019-10-07 18:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-07 16:03 [systemd SELinux] system status permission Ian Pilcher
2019-10-07 16:51 ` Dominick Grift
2019-10-07 17:09 ` Dominick Grift
2019-10-07 18:31 ` Ian Pilcher [this message]
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=4309d36c-d15c-1d7c-2e61-5d58e470c1cd@gmail.com \
--to=arequipeno@gmail.com \
--cc=selinux@vger.kernel.org \
--cc=systemd-devel@lists.freedesktop.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).