Bug 450373 - SELinux preventing cyphesis from creating log file
SELinux preventing cyphesis from creating log file
Product: Fedora
Classification: Fedora
Component: cyphesis (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Wart
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-06-07 02:57 EDT by Alexey Torkhov
Modified: 2008-12-21 03:22 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-12-21 03:22:12 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Alexey Torkhov 2008-06-07 02:57:20 EDT
Description of problem:

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
Actual results:

Expected results:

Additional info:
Comment 1 Alexey Torkhov 2008-06-07 03:04:29 EDT
Sorry, submitted too early. So,

SELinux is preventing cyphesis from creating log file

Description of problem:
I see following avc deny when starting cyphesis
host=nat.tortilla.ru type=AVC msg=audit(1212820072.648:139): avc: denied {
append } for pid=4309 comm="cyphesis" name="cyphesis_event.log" dev=sdd3
ino=2588853 scontext=unconfined_u:system_r:cyphesis_t:s0
tcontext=system_u:object_r:var_log_t:s0 tclass=file host=nat.tortilla.ru
type=SYSCALL msg=audit(1212820072.648:139): arch=40000003 syscall=5 success=no
exit=-13 a0=9ea4fac a1=8441 a2=1b6 a3=440 items=0 ppid=4308 pid=4309 auid=502
uid=493 gid=487 euid=493 suid=493 fsuid=493 egid=487 sgid=487 fsgid=487
tty=(none) ses=1 comm="cyphesis" exe="/usr/bin/cyphesis"
subj=unconfined_u:system_r:cyphesis_t:s0 key=(null) 

Version-Release number of selected component (if applicable):

How reproducible:

Additional info:
In previous cyphesis-selinux package cyphesis was allowed to var_log_t, but in
new policy cyphesis_log_t was introduced. But gen_context on /var/log/cyphesis
wasn't added. So, I'm guessing, it should be added there.
Comment 2 Alexey Torkhov 2008-06-07 03:06:06 EDT
P.S. As a workaround, I've made
chcon -t cyphesis_log_t /var/log/cyphesis /var/log/cyphesis/cyphesis_event.log
after this, all seems to work fine.
Comment 3 Wart 2008-06-08 20:32:17 EDT
I'm unable to reproduce this.  On my F9-i386 system, /var/log/cyphesis has:

# ls -Zd /var/log/cyphesis
drwxr-xr-x  cyphesis cyphesis system_u:object_r:var_log_t:s0   /var/log/cyphesis

...and the log file has:

# ls -Z /var/log/cyphesis
-rw-r--r--  cyphesis cyphesis unconfined_u:object_r:cyphesis_log_t:s0

cyphesis has no trouble creating and writing to the log file at startup when
selinux is in Enforcing mode.  What version of selinux-policy-targeted are you

# rpm -q selinux-policy-targeted
Comment 4 Alexey Torkhov 2008-06-09 03:36:11 EDT
In my system it is newer:
Comment 5 Wart 2008-06-15 15:50:32 EDT
I still can't reproduce this with a clean F-9 install+updates and

Is it possible that you have a leftover cyphesis-selinux package installed?  Or
maybe the cyphesis-selinux policies are still loaded and you need a reboot to
unload them?
Comment 6 Alexey Torkhov 2008-06-16 03:12:39 EDT
Oh. Right, to be sure, I made policy reload and reinstalled the package. Now,
cyphesis is able to create log labeled cyphesis_log_t and write to it. Other
cyphesis selinux bug distracted me and I misreaded your comment #3, sorry.

In my system, log had var_log_t after update. In new installations all is
working fine.

But I think that file context for /var/log/cyphesis/cyphesis_event.log should be
added into selinux policy - it will allow to do restorecon on update and will
preserve label if user decides to do relabel himself.
Comment 7 Alexey Torkhov 2008-07-04 13:03:30 EDT
Sometimes, for unknown reason, logfile selunux type got reset to standard
var_log_t. May be something is making restorecon on it?

Anyway, policy should be updated.
Comment 8 Fedora Update System 2008-11-17 13:16:58 EST
cyphesis-0.5.17-1.fc10 has been submitted as an update for Fedora 10.
Comment 9 Fedora Update System 2008-11-22 11:47:38 EST
cyphesis-0.5.17-1.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update cyphesis'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/f10/FEDORA-2008-9949
Comment 10 Fedora Update System 2008-12-21 03:22:04 EST
cyphesis-0.5.17-1.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.

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