Bug 560983 - SELinux is preventing dhclient (dhcpc_t) "write" to ./dhclient-wlan0.pid (var_run_t).
Summary: SELinux is preventing dhclient (dhcpc_t) "write" to ./dhclient-wlan0.pid (var...
Keywords:
Status: CLOSED DUPLICATE of bug 538428
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 12
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:7aa2dbaff99...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-02-02 12:25 UTC by Weonjong Lee
Modified: 2010-02-03 04:33 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-02-02 14:01:54 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Weonjong Lee 2010-02-02 12:25:38 UTC
요약:

SELinux is preventing dhclient (dhcpc_t) "write" to ./dhclient-wlan0.pid
(var_run_t).

상세 설명:

SELinux is preventing dhclient (dhcpc_t) "write" to ./dhclient-wlan0.pid
(var_run_t). The SELinux type var_run_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 (./dhclient-wlan0.pid)
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 './dhclient-wlan0.pid'. If the file context does not change from
var_run_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.

액세스 허용:

You can attempt to fix file context by executing restorecon -v
'./dhclient-wlan0.pid'

Fix 명령 :

restorecon './dhclient-wlan0.pid'

자세한 정보:

소스 문맥                 system_u:system_r:dhcpc_t:s0
대상 문맥                 unconfined_u:object_r:var_run_t:s0
대상 객체                 ./dhclient-wlan0.pid [ file ]
소스                        dhclient
소스 경로                 /sbin/dhclient
포트                        <알려지지 않음>
호스트                     (removed)
소스 RPM 패키지          dhclient-4.0.0-14.fc9
대상 RPM 패키지          
정책 RPM                    selinux-policy-3.3.1-74.fc9
Selinux 활성화             True
정책 유형                 targeted
강제 모드                 Enforcing
플러그인명               mislabeled_file
호스트명                  (removed)
플랫폼                     Linux (removed) 2.6.25.9-76.fc9.x86_64 #1 SMP Fri Jun
                              27 15:58:30 EDT 2008 x86_64 x86_64
통지 카운트              18
초기 화면                 2008년 07월 21일 (월) 오전 11시 20분 10초
마지막 화면              2008년 07월 21일 (월) 오후 03시 29분 55초
로컬 ID                     e3df4955-ee5f-4258-a267-928e2eb215fb
줄 번호                    

원 감사 메세지          

node=(removed) type=AVC msg=audit(1216621795.881:80): avc:  denied  { write } for  pid=5645 comm="dhclient" name="dhclient-wlan0.pid" dev=sda5 ino=721577 scontext=system_u:system_r:dhcpc_t:s0 tcontext=unconfined_u:object_r:var_run_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1216621795.881:80): arch=c000003e syscall=2 success=no exit=-13 a0=7fffe4332e99 a1=241 a2=1a4 a3=32ddd67a70 items=0 ppid=1 pid=5645 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="dhclient" exe="/sbin/dhclient" subj=system_u:system_r:dhcpc_t:s0 key=(null)



Hash String generated from  selinux-policy-3.3.1-74.fc9,mislabeled_file,dhclient,dhcpc_t,var_run_t,file,write
audit2allow suggests:

#============= dhcpc_t ==============
allow dhcpc_t var_run_t:file write;

Comment 1 Daniel Walsh 2010-02-02 14:01:54 UTC
You are reporting an F12 bug with F9 policy

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


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