Bug 971125 - SELinux is preventing /usr/bin/sed from 'remove_name' accesses on the directory sedQK1KFU.
SELinux is preventing /usr/bin/sed from 'remove_name' accesses on the directo...
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
18
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
abrt_hash:ecea6053c0179bcc9e06b1ae6ec...
:
: 971126 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-05 14:23 EDT by Moez Roy
Modified: 2013-06-07 15:24 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-06-07 15:23:26 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 Moez Roy 2013-06-05 14:23:25 EDT
Description of problem:
SELinux is preventing /usr/bin/sed from 'remove_name' accesses on the directory sedQK1KFU.

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

If you want to allow sed to have remove_name access on the sedQK1KFU directory
Then you need to change the label on sedQK1KFU
Do
# semanage fcontext -a -t FILE_TYPE 'sedQK1KFU'
where FILE_TYPE is one of the following: openshift_rw_file_t, openshift_tmp_t, openshift_tmpfs_t, tmp_t, tmpfs_t. 
Then execute: 
restorecon -v 'sedQK1KFU'


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

If you believe that sed should be allowed remove_name access on the sedQK1KFU 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 sed /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:system_r:openshift_app_t:s0-s0:c0.c10
                              23
Target Context                system_u:object_r:etc_t:s0
Target Objects                sedQK1KFU [ dir ]
Source                        sed
Source Path                   /usr/bin/sed
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           sed-4.2.1-10.fc18.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-97.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.9.4-200.fc18.x86_64 #1 SMP Fri
                              May 24 20:10:49 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-06-05 11:19:00 PDT
Last Seen                     2013-06-05 11:19:00 PDT
Local ID                      52da67fd-c826-4420-adfa-ff750a73748a

Raw Audit Messages
type=AVC msg=audit(1370456340.104:654): avc:  denied  { remove_name } for  pid=5758 comm="sed" name="sedQK1KFU" dev="dm-2" ino=2496341 scontext=unconfined_u:system_r:openshift_app_t:s0-s0:c0.c1023 tcontext=system_u:object_r:etc_t:s0 tclass=dir


type=AVC msg=audit(1370456340.104:654): avc:  denied  { rename } for  pid=5758 comm="sed" name="sedQK1KFU" dev="dm-2" ino=2496341 scontext=unconfined_u:system_r:openshift_app_t:s0-s0:c0.c1023 tcontext=system_u:object_r:etc_t:s0 tclass=file


type=AVC msg=audit(1370456340.104:654): avc:  denied  { unlink } for  pid=5758 comm="sed" name="google-chrome" dev="dm-2" ino=2496338 scontext=unconfined_u:system_r:openshift_app_t:s0-s0:c0.c1023 tcontext=system_u:object_r:etc_t:s0 tclass=file


type=SYSCALL msg=audit(1370456340.104:654): arch=x86_64 syscall=rename success=yes exit=0 a0=105fd60 a1=7fffc7711eea a2=105fd60 a3=0 items=0 ppid=5728 pid=5758 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=10 tty=(none) comm=sed exe=/usr/bin/sed subj=unconfined_u:system_r:openshift_app_t:s0-s0:c0.c1023 key=(null)

Hash: sed,openshift_app_t,etc_t,dir,remove_name

audit2allow

#============= openshift_app_t ==============
allow openshift_app_t etc_t:dir remove_name;
allow openshift_app_t etc_t:file { rename unlink };

audit2allow -R
require {
	type openshift_app_t;
}

#============= openshift_app_t ==============
files_delete_etc_dir_entry(openshift_app_t)
files_manage_etc_files(openshift_app_t)


Additional info:
reporter:       libreport-2.1.4
hashmarkername: setroubleshoot
kernel:         3.9.4-200.fc18.x86_64
type:           libreport
Comment 1 Daniel Walsh 2013-06-07 15:23:26 EDT
If you are going to run openshift, you need to do it in enforcing mode.  The problem here is some tools are trying to maitain the etc_t labels.  We need to get these running within containers so that they will not attempt to maintain SELinux labels.
Comment 2 Daniel Walsh 2013-06-07 15:24:21 EDT
*** Bug 971126 has been marked as a duplicate of this bug. ***

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