Bug 1198272 - SELinux is preventing /usr/bin/python2.7 from 'write' accesses on the directory /home.
Summary: SELinux is preventing /usr/bin/python2.7 from 'write' accesses on the directo...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 21
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:4bee1f24d7e3b472d74c0b092e8...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-03 17:15 UTC by Heiko Adams
Modified: 2015-03-31 21:46 UTC (History)
5 users (show)

Fixed In Version: selinux-policy-3.13.1-105.9.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-31 21:46:38 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Heiko Adams 2015-03-03 17:15:23 UTC
Description of problem:
Building blueman from git and starting blueman-applet afterwards
SELinux is preventing /usr/bin/python2.7 from 'write' accesses on the directory /home.

*****  Plugin catchall (100. confidence) suggests   **************************

If sie denken, dass es python2.7 standardmässig erlaubt sein sollte, write Zugriff auf home directory zu erhalten.
Then sie sollten dies als Fehler melden.
Um diesen Zugriff zu erlauben, können Sie ein lokales Richtlinien-Modul erstellen.
Do
zugriff jetzt erlauben, indem Sie die nachfolgenden Befehle ausführen:
# grep python /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:blueman_t:s0-s0:c0.c1023
Target Context                system_u:object_r:home_root_t:s0
Target Objects                /home [ dir ]
Source                        python
Source Path                   /usr/bin/python2.7
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           python-2.7.8-7.fc21.x86_64
Target RPM Packages           filesystem-3.2-28.fc21.x86_64
Policy RPM                    selinux-policy-3.13.1-105.3.fc21.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.18.7-200.fc21.x86_64 #1 SMP Wed
                              Feb 11 21:53:17 UTC 2015 x86_64 x86_64
Alert Count                   4
First Seen                    2015-03-03 18:12:50 CET
Last Seen                     2015-03-03 18:12:50 CET
Local ID                      143a9da4-81b1-4b60-b387-406a8575495e

Raw Audit Messages
type=AVC msg=audit(1425402770.561:729): avc:  denied  { write } for  pid=8456 comm="python" name="/" dev="dm-2" ino=2 scontext=system_u:system_r:blueman_t:s0-s0:c0.c1023 tcontext=system_u:object_r:home_root_t:s0 tclass=dir permissive=0


type=SYSCALL msg=audit(1425402770.561:729): arch=x86_64 syscall=access success=no exit=EACCES a0=7fffd5232fed a1=2 a2=0 a3=0 items=0 ppid=1 pid=8456 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=python exe=/usr/bin/python2.7 subj=system_u:system_r:blueman_t:s0-s0:c0.c1023 key=(null)

Hash: python,blueman_t,home_root_t,dir,write

Version-Release number of selected component:
selinux-policy-3.13.1-105.3.fc21.noarch

Additional info:
reporter:       libreport-2.3.0
hashmarkername: setroubleshoot
kernel:         3.18.7-200.fc21.x86_64
type:           libreport

Comment 1 Lukas Vrabec 2015-03-05 10:21:52 UTC
Hi, 

Did you login as root? It's not a good idea. Login as user.

Comment 2 Heiko Adams 2015-03-05 10:35:08 UTC
No, I did not login as root. I just build a current git-snapshot of blueman using mock, installed the package and started blueman-applet.

Comment 3 Miroslav Grepl 2015-03-18 09:35:08 UTC
Lukas,
I see "access" check. We should dontaudit it.

Comment 4 Lukas Vrabec 2015-03-20 13:14:07 UTC
commit a3ed9e61d5c66f625f31e5929a82ceaac7bc9f90
Author: Lukas Vrabec <lvrabec>
Date:   Fri Mar 20 14:12:42 2015 +0100

    Dontaudit blueman_t write to all mountpoints. BZ(1198272)

Comment 5 Fedora Update System 2015-03-23 16:47:59 UTC
selinux-policy-3.13.1-105.9.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/selinux-policy-3.13.1-105.9.fc21

Comment 6 Fedora Update System 2015-03-26 21:28:17 UTC
Package selinux-policy-3.13.1-105.9.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.13.1-105.9.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-4492/selinux-policy-3.13.1-105.9.fc21
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2015-03-31 21:46:38 UTC
selinux-policy-3.13.1-105.9.fc21 has been pushed to the Fedora 21 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.