Bug 784877 - SELinux is preventing /usr/sbin/clamd from 'open' accesses on the None /var/log/clamd.clamav.
Summary: SELinux is preventing /usr/sbin/clamd from 'open' accesses on the None /var/l...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 16
Hardware: i686
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:4427a07f41bd15bed14f330b4c7...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-01-26 14:40 UTC by Frank Murphy
Modified: 2012-01-26 22:55 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-01-26 22:50:59 UTC
Type: ---


Attachments (Terms of Use)

Description Frank Murphy 2012-01-26 14:40:20 UTC
libreport version: 2.0.8
executable:     /usr/bin/python
hashmarkername: setroubleshoot
kernel:         3.2.1-3.fc16.i686
reason:         SELinux is preventing /usr/sbin/clamd from 'open' accesses on the None /var/log/clamd.clamav.
time:           Thu 26 Jan 2012 14:39:22 GMT

description:
:SELinux is preventing /usr/sbin/clamd from 'open' accesses on the None /var/log/clamd.clamav.
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that clamd should be allowed open access on the clamd.clamav <Unknown> 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 clamd /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:clamd_t:s0
:Target Context                unconfined_u:object_r:var_log_t:s0
:Target Objects                /var/log/clamd.clamav [ None ]
:Source                        clamd
:Source Path                   /usr/sbin/clamd
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           
:Target RPM Packages           
:Policy RPM                    <Unknown>
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.2.1-3.fc16.i686 #1
:                              SMP Mon Jan 23 15:44:05 UTC 2012 i686 i686
:Alert Count                   3
:First Seen                    Thu 26 Jan 2012 14:20:09 GMT
:Last Seen                     Thu 26 Jan 2012 14:38:40 GMT
:Local ID                      1c21c022-69f9-4229-a5be-7c4f2e690257
:
:Raw Audit Messages
:type=AVC msg=audit(1327588720.610:104): avc:  denied  { open } for  pid=1771 comm="clamd" name="clamd.clamav" dev=dm-1 ino=52 scontext=system_u:system_r:clamd_t:s0 tcontext=unconfined_u:object_r:var_log_t:s0 tclass=filenode=(removed) type=SYSCALL msg=audit(1327588720.610:104): arch=40000003 syscall=5 success=no exit=-13 a0=8b0f5b0 a1=441 a2=1b6 a3=0 items=0 ppid=1770 pid=1771 auid=4294967295 uid=1001 gid=1001 euid=1001 suid=1001 fsuid=1001 egid=1001 sgid=1001 fsgid=1001 tty=(none) ses=4294967295 comm="clamd" exe="/usr/sbin/clamd" subj=system_u:system_r:clamd_t:s0 key=(null)
:
:
:Hash: clamd,clamd_t,var_log_t,None,open
:
:audit2allow
:
:
:audit2allow -R
:
:

Comment 1 Frank Murphy 2012-01-26 14:47:55 UTC
clamav  from Fedora repos,  installed with following script:
https://raw.github.com/csmart/naa/master/sysadmin/scripts/configure-clamd.sh

Comment 2 Daniel Walsh 2012-01-26 22:49:37 UTC
restorecon -v /var/log/clamd*

Will fix.

Comment 3 Daniel Walsh 2012-01-26 22:50:59 UTC
Anywhere in that script that it creates a file/directory, it should run restorecon on it.

Comment 4 Frank Murphy 2012-01-26 22:55:39 UTC
(In reply to comment #3)
> Anywhere in that script that it creates a file/directory, it should run
> restorecon on it.


Thanks Dan,
Something to watch out for.


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