Bug 976968 - SELinux is preventing /usr/bin/cp from 'relabelfrom' accesses on the file timer.h.
Summary: SELinux is preventing /usr/bin/cp from 'relabelfrom' accesses on the file tim...
Keywords:
Status: CLOSED DUPLICATE of bug 976939
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:5d70deec9b2886629671c8438fb...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-22 06:03 UTC by Moez Roy
Modified: 2013-06-22 11:11 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-06-22 11:11:05 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Moez Roy 2013-06-22 06:03:41 UTC
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
Do
# 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.
Do
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

audit2allow

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

audit2allow -R
require {
	type initrc_t;
}

#============= initrc_t ==============
files_relabelfrom_usr_files(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 11:11:05 UTC

*** 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.