Bug 712361 - SELinux is preventing /usr/bin/perl from 'read' accesses on the lnk_file /var/lock.
Summary: SELinux is preventing /usr/bin/perl from 'read' accesses on the lnk_file /var...
Status: CLOSED DUPLICATE of bug 712136
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: rawhide
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
Whiteboard: setroubleshoot_trace_hash:51064b3fc05...
Depends On:
TreeView+ depends on / blocked
Reported: 2011-06-10 12:37 UTC by Lech Lobocki
Modified: 2011-06-11 07:48 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2011-06-11 07:48:51 UTC

Attachments (Terms of Use)

Description Lech Lobocki 2011-06-10 12:37:50 UTC
SELinux is preventing /usr/bin/perl from 'read' accesses on the lnk_file /var/lock.

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

If należy zezwolić perl na dostęp read w lock lnk_file
Then należy zmienić etykietę /var/lock
# semanage fcontext -a -t TYP_PLIKU '/var/lock',
gdzie TYP_PLIKU jest jednym z poniższych: usr_t, device_t, device_t, devlog_t, locale_t, etc_t, ld_so_t, mrtg_t, proc_t, proc_t, sysfs_t, textrel_shlib_t, rpm_script_tmp_t, mrtg_lock_t, var_run_t, var_run_t, proc_net_t, mrtg_var_lib_t, etc_runtime_t, snmpd_var_lib_t, udev_var_run_t, mrtg_etc_t, httpd_sys_content_t, var_lock_t, abrt_t, bin_t, cert_t, lib_t, lib_t, root_t, var_run_t, var_run_t, var_run_t, cert_t. 
Następnie należy wykonać polecenie: 
restorecon -v '/var/lock'

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

If aby perl powinno mieć domyślnie read dostęp do lock lnk_file.
Then proszę to zgłosić jako błąd.
Można utworzyć lokalny moduł polityki, aby umożliwić ten dostęp.
można tymczasowo zezwolić na ten dostęp wykonując polecenia:
# grep mrtg /var/log/audit/audit.log | audit2allow -M moja_polityka
# semodule -i moja_polityka.pp

Additional Information:
Source Context                system_u:system_r:mrtg_t:s0-s0:c0.c1023
Target Context                system_u:object_r:var_t:s0
Target Objects                /var/lock [ lnk_file ]
Source                        mrtg
Source Path                   /usr/bin/perl
Port                          <Nieznane>
Host                          (removed)
Source RPM Packages           perl-5.12.3-157.fc15
Target RPM Packages           filesystem-2.4.41-1.fc15
Policy RPM                    selinux-policy-3.9.16-26.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) #1 SMP Sun
                              May 15 17:23:28 UTC 2011 x86_64 x86_64
Alert Count                   138
First Seen                    sob, 4 cze 2011, 02:15:59
Last Seen                     pią, 10 cze 2011, 16:25:01
Local ID                      45e297b2-97db-42bf-8daa-81a7a796e41a

Raw Audit Messages
type=AVC msg=audit(1307715901.829:79): avc:  denied  { read } for  pid=2565 comm="mrtg" name="lock" dev=sda6 ino=134333 scontext=system_u:system_r:mrtg_t:s0-s0:c0.c1023 tcontext=system_u:object_r:var_t:s0 tclass=lnk_file

type=SYSCALL msg=audit(1307715901.829:79): arch=x86_64 syscall=open success=no exit=EACCES a0=15592d0 a1=241 a2=1b6 a3=3ddf125de0 items=0 ppid=2562 pid=2565 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=2 comm=mrtg exe=/usr/bin/perl subj=system_u:system_r:mrtg_t:s0-s0:c0.c1023 key=(null)

Hash: mrtg,mrtg_t,var_t,lnk_file,read


#============= mrtg_t ==============
allow mrtg_t var_t:lnk_file read;

audit2allow -R

#============= mrtg_t ==============
allow mrtg_t var_t:lnk_file read;

Comment 1 Dominick Grift 2011-06-10 12:46:04 UTC
The fix is to run: restorecon -R -v /var

Comment 2 Lech Lobocki 2011-06-10 13:31:59 UTC
Yes, the fix worked. Thanks a lot!

Comment 3 Miroslav Grepl 2011-06-11 07:48:51 UTC
We also have a fix in the latest policy.

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

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