Bug 912100 - SELinux is preventing /usr/lib/systemd/systemd-hostnamed from 'read' accesses on the file /etc/hostname.
Summary: SELinux is preventing /usr/lib/systemd/systemd-hostnamed from 'read' accesses...
Keywords:
Status: CLOSED DUPLICATE of bug 912036
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 18
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:0c7290e141e3f8e61a8d564d02c...
: 912157 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-17 17:46 UTC by Pascal94
Modified: 2013-02-18 10:47 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-18 10:47:28 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Pascal94 2013-02-17 17:46:18 UTC
Description of problem:
I don't know what happened and why. I was browsing Viadeo
SELinux is preventing /usr/lib/systemd/systemd-hostnamed from 'read' accesses on the file /etc/hostname.

*****  Plugin restorecon (99.5 confidence) suggests  *************************

If vous souhaitez corriger l'étiquette. 
L'étiquette par défaut de /etc/hostname devrait être etc_t.
Then vous pouvez exécuter restorecon.
Do
# /sbin/restorecon -v /etc/hostname

*****  Plugin catchall (1.49 confidence) suggests  ***************************

If vous pensez que systemd-hostnamed devrait être autorisé à accéder read sur hostname file par défaut.
Then vous devriez rapporter ceci en tant qu'anomalie.
Vous pouvez générer un module de stratégie local pour autoriser cet accès.
Do
autoriser cet accès pour le moment en exécutant :
# grep systemd-hostnam /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:systemd_hostnamed_t:s0
Target Context                system_u:object_r:etc_runtime_t:s0
Target Objects                /etc/hostname [ file ]
Source                        systemd-hostnam
Source Path                   /usr/lib/systemd/systemd-hostnamed
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           systemd-197-1.fc18.2.x86_64
Target RPM Packages           systemd-197-1.fc18.2.x86_64
Policy RPM                    selinux-policy-3.11.1-78.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.7.5-201.fc18.x86_64 #1 SMP Mon
                              Jan 28 19:54:41 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-02-17 18:44:33 CET
Last Seen                     2013-02-17 18:44:33 CET
Local ID                      70e8c39e-5f9d-4fd8-b5a3-94dd09babe6b

Raw Audit Messages
type=AVC msg=audit(1361123073.722:458): avc:  denied  { read } for  pid=28373 comm="systemd-hostnam" name="hostname" dev="dm-1" ino=1072561 scontext=system_u:system_r:systemd_hostnamed_t:s0 tcontext=system_u:object_r:etc_runtime_t:s0 tclass=file


type=SYSCALL msg=audit(1361123073.722:458): arch=x86_64 syscall=open success=no exit=EACCES a0=7fdcdd560d68 a1=80000 a2=1b6 a3=238 items=0 ppid=1 pid=28373 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=systemd-hostnam exe=/usr/lib/systemd/systemd-hostnamed subj=system_u:system_r:systemd_hostnamed_t:s0 key=(null)

Hash: systemd-hostnam,systemd_hostnamed_t,etc_runtime_t,file,read

audit2allow

#============= systemd_hostnamed_t ==============
allow systemd_hostnamed_t etc_runtime_t:file read;

audit2allow -R

#============= systemd_hostnamed_t ==============
allow systemd_hostnamed_t etc_runtime_t:file read;


Additional info:
hashmarkername: setroubleshoot
kernel:         3.7.5-201.fc18.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2013-02-18 10:47:01 UTC
*** Bug 912157 has been marked as a duplicate of this bug. ***

Comment 2 Miroslav Grepl 2013-02-18 10:47:28 UTC

*** This bug has been marked as a duplicate of bug 912036 ***


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