| Summary: | SELinux is preventing /bin/bash from 'read' accesses on the lnk_file /var/lock. | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Alice K <alice_knoll_drouin> |
| Component: | selinux-policy | Assignee: | Miroslav Grepl <mgrepl> |
| Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 15 | CC: | dominick.grift, dwalsh, mgrepl, old.uncle.z |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | setroubleshoot_trace_hash:fbf62523fd481b6dbcd5557c3081afa1ddb7ffd54259e63bc40db9c7492d36d9 | ||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-05-31 15:44:22 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
Please, execute # restorecon -R -v /var will fix. |
SELinux is preventing /bin/bash from 'read' accesses on the lnk_file /var/lock. ***** Plugin restorecon (94.8 confidence) suggests ************************* If you want to fix the label. /var/lock default label should be var_lock_t. Then you can run restorecon. Do # /sbin/restorecon -v /var/lock ***** Plugin catchall_labels (5.21 confidence) suggests ******************** If you want to allow bash to have read access on the lock lnk_file Then you need to change the label on /var/lock Do # semanage fcontext -a -t FILE_TYPE '/var/lock' where FILE_TYPE is one of the following: etc_runtime_t, var_run_t, home_root_t, udev_var_run_t, var_lock_t, bin_t, cert_t, usr_t, device_t, devlog_t, locale_t, dhcpc_t, etc_t, proc_t, sysfs_t, dhcp_etc_t, abrt_t, lib_t, root_t, device_t, var_run_t, ld_so_t, proc_t, textrel_shlib_t, proc_net_t, proc_xen_t, rpm_script_tmp_t. Then execute: restorecon -v '/var/lock' ***** Plugin catchall (1.44 confidence) suggests *************************** If you believe that bash should be allowed read access on the lock lnk_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 dhclient-script /var/log/audit/audit.log | audit2allow -M mypol # semodule -i mypol.pp Additional Information: Source Context unconfined_u:system_r:dhcpc_t:s0-s0:c0.c1023 Target Context system_u:object_r:var_t:s0 Target Objects /var/lock [ lnk_file ] Source dhclient-script Source Path /bin/bash Port <Unknown> Host (removed) Source RPM Packages bash-4.2.10-2.fc15 Target RPM Packages filesystem-2.4.41-1.fc15 Policy RPM selinux-policy-3.9.16-24.fc15 Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name (removed) Platform Linux (removed) 2.6.38.6-27.fc15.x86_64 #1 SMP Sun May 15 17:23:28 UTC 2011 x86_64 x86_64 Alert Count 2 First Seen Tue 31 May 2011 10:37:10 AM MYT Last Seen Tue 31 May 2011 11:19:32 AM MYT Local ID 35718871-9d04-4020-afff-8be85cd5eb70 Raw Audit Messages type=AVC msg=audit(1306811972.763:60): avc: denied { read } for pid=1810 comm="dhclient-script" name="lock" dev=dm-1 ino=132082 scontext=unconfined_u:system_r:dhcpc_t:s0-s0:c0.c1023 tcontext=system_u:object_r:var_t:s0 tclass=lnk_file type=SYSCALL msg=audit(1306811972.763:60): arch=x86_64 syscall=stat success=no exit=EACCES a0=1668610 a1=7fff78969be0 a2=7fff78969be0 a3=8 items=0 ppid=1778 pid=1810 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=1 comm=dhclient-script exe=/bin/bash subj=unconfined_u:system_r:dhcpc_t:s0-s0:c0.c1023 key=(null) Hash: dhclient-script,dhcpc_t,var_t,lnk_file,read audit2allow #============= dhcpc_t ============== allow dhcpc_t var_t:lnk_file read; audit2allow -R #============= dhcpc_t ============== allow dhcpc_t var_t:lnk_file read;