Bug 981983 - SELinux is preventing /usr/sbin/sedispatch from 'write' accesses on the sock_file log.
SELinux is preventing /usr/sbin/sedispatch from 'write' accesses on the sock_...
Status: CLOSED CANTFIX
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
19
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
abrt_hash:9a2d09331c2238887957b06e455...
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-07 10:12 EDT by Igor Gnatenko
Modified: 2013-07-30 08:04 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-26 12:42:19 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 Igor Gnatenko 2013-07-07 10:12:00 EDT
Description of problem:
# vzctl create 101 centos-6-x86_64
# vzctl start 101
nothig more
SELinux is preventing /usr/sbin/sedispatch from 'write' accesses on the sock_file log.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that sedispatch should be allowed write access on the log sock_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 sedispatch /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:audisp_t:s0
Target Context                unconfined_u:object_r:device_t:s0
Target Objects                log [ sock_file ]
Source                        sedispatch
Source Path                   /usr/sbin/sedispatch
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           setroubleshoot-server-3.2.10-1.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-59.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.9.9-301.fc19.x86_64 #1 SMP Thu
                              Jul 4 15:10:36 UTC 2013 x86_64 x86_64
Alert Count                   626
First Seen                    2013-07-07 18:02:08 MSK
Last Seen                     2013-07-07 18:05:36 MSK
Local ID                      7e842cf6-81db-4576-b440-f5791ef235d6

Raw Audit Messages
type=AVC msg=audit(1373205936.67:236327): avc:  denied  { write } for  pid=311 comm="sedispatch" name="log" dev="devtmpfs" ino=925088 scontext=system_u:system_r:audisp_t:s0 tcontext=unconfined_u:object_r:device_t:s0 tclass=sock_file


type=SYSCALL msg=audit(1373205936.67:236327): arch=x86_64 syscall=connect success=no exit=EACCES a0=4 a1=3abedbc740 a2=6e a3=202c746f6f687365 items=0 ppid=308 pid=311 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=sedispatch exe=/usr/sbin/sedispatch subj=system_u:system_r:audisp_t:s0 key=(null)

Hash: sedispatch,audisp_t,device_t,sock_file,write

Additional info:
reporter:       libreport-2.1.5
hashmarkername: setroubleshoot
kernel:         3.9.9-301.fc19.x86_64
type:           libreport

Potential duplicate: bug 690340
Comment 1 Daniel Walsh 2013-07-08 15:11:26 EDT
Somehow /dev/log got mislabeled?  Where you running syslog tools by hand?
Comment 2 Daniel Walsh 2013-07-08 15:11:54 EDT
restorecon -v /dev/log

Will fix.
Comment 3 Igor Gnatenko 2013-07-20 09:08:24 EDT
restorecon:  lstat(/dev/log) failed:  No such file or directory
Comment 4 Daniel Walsh 2013-07-22 10:02:45 EDT
If you don't have a /dev/log you have greater problems than SELinux issues.

/dev/log should be on every system.
Comment 5 Igor Gnatenko 2013-07-22 10:09:16 EDT
(In reply to Daniel Walsh from comment #4)
> If you don't have a /dev/log you have greater problems than SELinux issues.
> 
> /dev/log should be on every system.
I have fresh install of Fedora 19.
Comment 6 Miroslav Grepl 2013-07-26 07:38:51 EDT
Are you up-to-date? Did you install it from LiveCD?
Comment 7 Igor Gnatenko 2013-07-26 07:51:03 EDT
(In reply to Miroslav Grepl from comment #6)
> Are you up-to-date? Did you install it from LiveCD?
Yes. I've used netinst
Comment 8 Daniel Walsh 2013-07-26 12:42:19 EDT
This is caused by a bug in openvz which is deleteing the /dev/log socket.
Comment 9 Kir Kolyshkin 2013-07-29 21:03:07 EDT
For the readers of this bug -- here's a relevant OpenVZ bug filed: https://bugzilla.openvz.org/show_bug.cgi?id=2690

Nevertheless, to my best knowledge OpenVZ is not doing anything at all with /dev/log.
Comment 10 Daniel Walsh 2013-07-30 08:04:04 EDT
Well something is.

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