Bug 808952 - SELinux is preventing /usr/lib/systemd/systemd-multi-seat-x from 'write' accesses on the directory systemd.
SELinux is preventing /usr/lib/systemd/systemd-multi-seat-x from 'write' acce...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
17
All Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
abrt_hash:8848ed33c64e232985a1289b973...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-01 20:40 EDT by shawnlandden
Modified: 2012-05-23 18:04 EDT (History)
6 users (show)

See Also:
Fixed In Version: selinux-policy-3.10.0-116.fc17
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-04-18 19:07:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description shawnlandden 2012-04-01 20:40:08 EDT
libreport version: 2.0.8
executable:     /usr/bin/python
hashmarkername: setroubleshoot
kernel:         3.3.0-1.fc17.x86_64
reason:         SELinux is preventing /usr/lib/systemd/systemd-multi-seat-x from 'write' accesses on the directory systemd.
time:           Sun 01 Apr 2012 01:39:27 PM EDT

description:
:SELinux is preventing /usr/lib/systemd/systemd-multi-seat-x from 'write' accesses on the directory systemd.
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that systemd-multi-seat-x should be allowed write access on the systemd directory by default.
:Then you should report this as a bug.
:You can generate a local policy module to allow this access.
:Do
:allow this access for now by executing:
:# grep systemd-multi-s /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:xdm_t:s0-s0:c0.c1023
:Target Context                system_u:object_r:init_var_run_t:s0
:Target Objects                systemd [ dir ]
:Source                        systemd-multi-s
:Source Path                   /usr/lib/systemd/systemd-multi-seat-x
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           systemd-44-1.fc17.x86_64
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-104.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux localhost.localdomain 3.3.0-1.fc17.x86_64 #1
:                              SMP Mon Mar 19 03:03:39 UTC 2012 x86_64 x86_64
:Alert Count                   6
:First Seen                    Sun 01 Apr 2012 01:29:54 PM EDT
:Last Seen                     Sun 01 Apr 2012 01:29:54 PM EDT
:Local ID                      2d54cc3a-343a-44b7-95df-bd3417bc48c3
:
:Raw Audit Messages
:type=AVC msg=audit(1333301394.950:323): avc:  denied  { write } for  pid=1638 comm="systemd-multi-s" name="systemd" dev="tmpfs" ino=7589 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:init_var_run_t:s0 tclass=dir
:
:
:type=SYSCALL msg=audit(1333301394.950:323): arch=x86_64 syscall=mkdir success=no exit=EACCES a0=4034a6 a1=1ed a2=7fab10ea5770 a3=7ffffeca6640 items=0 ppid=1636 pid=1638 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=systemd-multi-s exe=/usr/lib/systemd/systemd-multi-seat-x subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 key=(null)
:
:Hash: systemd-multi-s,xdm_t,init_var_run_t,dir,write
:
:audit2allowunable to open /sys/fs/selinux/policy:  Permission denied
:
:
:audit2allow -Runable to open /sys/fs/selinux/policy:  Permission denied
:
:
Comment 1 Daniel Walsh 2012-04-02 15:58:50 EDT
Any idea what directory/file it is trying to write?  Is this writing content into /run/systemd
Comment 2 Daniel Walsh 2012-04-02 16:00:11 EDT
/run/systemd/multi-session-x/
/run/systemd/multi-session-x
/run/plymouth/pid


Systemd guys what processess have to be able to write here?  Read Hear?
Comment 3 Daniel Walsh 2012-04-02 16:02:58 EDT
Currently we have

/var/run/systemd/seats(/.*)?	gen_context(system_u:object_r:systemd_logind_var_run_t,s0)
/var/run/systemd/sessions(/.*)?	gen_context(system_u:object_r:systemd_logind_sessions_t,s0)
/var/run/systemd/users(/.*)?	gen_context(system_u:object_r:systemd_logind_var_run_t,s0)

Should we label multi-session-x the same?  Should we treat  systemd-multi-seat-x 
 like we treat /lib/systemd/systemd-logind
Comment 4 shawnlandden 2012-04-02 16:27:09 EDT
> Any idea what directory/file it is trying to write?  Is this writing content
into /run/systemd
yes
http://cgit.freedesktop.org/systemd/systemd/tree/src/login/multi-seat-x.c#n115
Comment 5 shawnlandden 2012-04-02 16:57:39 EDT
> Should we label multi-session-x the same?  Should we treat 
> systemd-multi-seat-x 
> like we treat /lib/systemd/systemd-logind

multi-seat-x is its own executable, and is an ugly wrapper around X until X gains this functionality natively

I dont think it needs access to the rules you listed above. The X server does need read access to the xorg.conf this wrapper writes out
Comment 6 Daniel Walsh 2012-04-09 16:42:18 EDT
Ok I am going to label this as xdm_var_run_t.

/var/run/systemd/multi-session-x(/.*)? gen_context(system_u:object_r:xdm_var_ru
 

And allow xdm_t to create it.  Does anything in systemd need to manage this directory?
Comment 7 Lennart Poettering 2012-04-11 09:25:30 EDT
multi-seat-x writes a throw-away configuration file for X to add graphics multi-seat support to X until X learns this natively.
Comment 8 shawnlandden 2012-04-11 16:09:12 EDT
> And allow xdm_t to create it.  Does anything in systemd need to manage this
directory?

no
Comment 9 Daniel Walsh 2012-04-13 13:56:24 EDT
Fixed in selinux-policy-3.10.0-114.fc17
Comment 10 Fedora Update System 2012-04-16 17:28:15 EDT
selinux-policy-3.10.0-116.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-116.fc17
Comment 11 Fedora Update System 2012-04-18 19:07:32 EDT
selinux-policy-3.10.0-116.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.