This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 446634 - SELinux is preventing cp (dhcpc_t) "unlink" to ./resolv.conf.predhclient.eth0 (etc_t)
SELinux is preventing cp (dhcpc_t) "unlink" to ./resolv.conf.predhclient.eth0...
Status: CLOSED DUPLICATE of bug 446633
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
9
i686 Linux
low Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-05-15 10:10 EDT by David Hislop
Modified: 2008-05-16 15:56 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-05-16 15:56:01 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 David Hislop 2008-05-15 10:10:12 EDT
Description of problem:
Newly installed Fedora 9; configured wired and wireless adaptors to be managed
by Network Manager, restarted network service; received SELinux error.

Version-Release number of selected component (if applicable):
N/A

How reproducible:
Every time

Steps to Reproduce:
1. As above
2.
3.
  
Actual results:

===== Copy from setroubleshoot starts

Summary:

SELinux is preventing cp (dhcpc_t) "unlink" to ./resolv.conf.predhclient.eth0
(etc_t).

Detailed Description:

SELinux is preventing cp (dhcpc_t) "unlink" to ./resolv.conf.predhclient.eth0
(etc_t). The SELinux type etc_t, is a generic type for all files in the
directory and very few processes (SELinux Domains) are allowed to write to this
SELinux type. This type of denial usual indicates a mislabeled file. By default
a file created in a directory has the gets the context of the parent directory,
but SELinux policy has rules about the creation of directories, that say if a
process running in one SELinux Domain (D1) creates a file in a directory with a
particular SELinux File Context (F1) the file gets a different File Context
(F2). The policy usually allows the SELinux Domain (D1) the ability to write,
unlink, and append on (F2). But if for some reason a file
(./resolv.conf.predhclient.eth0) was created with the wrong context, this domain
will be denied. The usual solution to this problem is to reset the file context
on the target file, restorecon -v './resolv.conf.predhclient.eth0'. If the file
context does not change from etc_t, then this is probably a bug in policy.
Please file a bug report (http://bugzilla.redhat.com/bugzilla/enter_bug.cgi)
against the selinux-policy package. If it does change, you can try your
application again to see if it works. The file context could have been
mislabeled by editing the file or moving the file from a different directory, if
the file keeps getting mislabeled, check the init scripts to see if they are
doing something to mislabel the file.

Allowing Access:

You can attempt to fix file context by executing restorecon -v
'./resolv.conf.predhclient.eth0'

Fix Command:

restorecon './resolv.conf.predhclient.eth0'

Additional Information:

Source Context                unconfined_u:system_r:dhcpc_t:s0
Target Context                unconfined_u:object_r:etc_t:s0
Target Objects                ./resolv.conf.predhclient.eth0 [ file ]
Source                        rm
Source Path                   /bin/rm
Port                          <Unknown>
Host                          slate
Source RPM Packages           coreutils-6.10-18.fc9
Target RPM Packages           
Policy RPM                    selinux-policy-3.3.1-42.fc9
Selinux Enabled               True
Policy Type                   targeted
MLS Enabled                   True
Enforcing Mode                Enforcing
Plugin Name                   mislabeled_file
Host Name                     slate
Platform                      Linux slate 2.6.25-14.fc9.i686 #1 SMP Thu May 1
                              06:28:41 EDT 2008 i686 i686
Alert Count                   10
First Seen                    Thu 15 May 2008 07:39:42 PM EST
Last Seen                     Thu 15 May 2008 11:46:54 PM EST
Local ID                      0c31bf45-5569-4bcf-afa3-3b44bb9eb463
Line Numbers                  

Raw Audit Messages            

host=slate type=AVC msg=audit(1210859214.201:75): avc:  denied  { unlink } for 
pid=1518 comm="cp" name="resolv.conf.predhclient.eth0" dev=dm-0 ino=196609
scontext=unconfined_u:system_r:dhcpc_t:s0
tcontext=unconfined_u:object_r:etc_t:s0 tclass=file

host=slate type=SYSCALL msg=audit(1210859214.201:75): arch=40000003 syscall=10
success=no exit=-13 a0=bfc37dc2 a1=8f9ff4 a2=805c3a0 a3=1a4 items=0 ppid=1479
pid=1518 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0
tty=(none) ses=1 comm="cp" exe="/bin/cp" subj=unconfined_u:system_r:dhcpc_t:s0
key=(null)


===== Copy from setroubleshoot ends

Expected results:


Additional info:
Comment 1 Daniel Walsh 2008-05-16 15:56:01 EDT

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

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