Bug 976968 - SELinux is preventing /usr/bin/cp from 'relabelfrom' accesses on the file timer.h.
SELinux is preventing /usr/bin/cp from 'relabelfrom' accesses on the file tim...
Status: CLOSED DUPLICATE of bug 976939
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-06-22 02:03 EDT by Moez Roy
Modified: 2013-06-22 07:11 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-06-22 07:11:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Moez Roy 2013-06-22 02:03:41 EDT
Description of problem:
SELinux is preventing /usr/bin/cp from 'relabelfrom' accesses on the file timer.h.

*****  Plugin catchall_labels (83.8 confidence) suggests  ********************

If you want to allow cp to have relabelfrom access on the timer.h file
Then you need to change the label on timer.h
# semanage fcontext -a -t FILE_TYPE 'timer.h'
where FILE_TYPE is one of the following: dhcpc_state_t, locale_t, net_conf_t, var_lib_nfs_t. 
Then execute: 
restorecon -v 'timer.h'

*****  Plugin catchall (17.1 confidence) suggests  ***************************

If you believe that cp should be allowed relabelfrom access on the timer.h file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
allow this access for now by executing:
# grep cp /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:system_r:initrc_t:s0
Target Context                system_u:object_r:usr_t:s0
Target Objects                timer.h [ file ]
Source                        cp
Source Path                   /usr/bin/cp
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           coreutils-8.17-8.fc18.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-97.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.9.6-200.fc18.x86_64 #1 SMP Thu
                              Jun 13 18:56:55 UTC 2013 x86_64 x86_64
Alert Count                   11
First Seen                    2013-06-21 23:02:53 PDT
Last Seen                     2013-06-21 23:02:53 PDT
Local ID                      f71a8645-df04-4085-b52d-36def4c45495

Raw Audit Messages
type=AVC msg=audit(1371880973.155:1260): avc:  denied  { relabelfrom } for  pid=10030 comm="cp" name="timer.h" dev="tmpfs" ino=67130 scontext=unconfined_u:system_r:initrc_t:s0 tcontext=system_u:object_r:usr_t:s0 tclass=file

type=SYSCALL msg=audit(1371880973.155:1260): arch=x86_64 syscall=fsetxattr success=no exit=EACCES a0=4 a1=7ffffc2f99d0 a2=12c1760 a3=1b items=0 ppid=10024 pid=10030 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=2 tty=pts0 comm=cp exe=/usr/bin/cp subj=unconfined_u:system_r:initrc_t:s0 key=(null)

Hash: cp,initrc_t,usr_t,file,relabelfrom


#============= initrc_t ==============
allow initrc_t usr_t:file relabelfrom;

audit2allow -R
require {
	type initrc_t;

#============= initrc_t ==============

Additional info:
reporter:       libreport-2.1.5
hashmarkername: setroubleshoot
kernel:         3.9.6-200.fc18.x86_64
type:           libreport
Comment 1 Daniel Walsh 2013-06-22 07:11:05 EDT

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

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