Bug 205011

Summary: Targeted Policy Blocks Write Access to /etc/privoxy/default.action
Product: [Fedora] Fedora Reporter: Carsten Clasohm <clasohm>
Component: selinux-policy-targetedAssignee: Daniel Walsh <dwalsh>
Severity: medium Docs Contact:
Priority: medium    
Version: 8CC: triage
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: bzcl34nup
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-11-17 22:02:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Carsten Clasohm 2006-09-02 09:37:51 UTC
Description of problem:
Privoxy allows users to customize its behaviour via the Web interface. Changes
to the configuration are saved in /etc/privoxy/default.action. With the targeted
SELinux policy, Privoxy is not allowed to write this file.

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

How reproducible:

Steps to Reproduce:
1. Enable the targeted SELinux policy in enforcing mode.
2. Start the privoxy service.
3. Configure your browser to use localhost 8118 as its HTTP proxy.
4. Go to http://config.privoxy.org/edit-actions-list?f=default
5. Click the first Edit button.
6. Click the Submit button.

Actual Results:  Privoxy will report that it cannot modify
/etc/privoxy/default.action, and /var/log/messages contains this message:

kernel: audit(1157189531.202:992): avc:  denied  { write } for  pid=14158
comm="privoxy" name="default.action" dev=dm-5 ino=360645
scontext=system_u:system_r:privoxy_t:s0 tcontext=system_u:object_r:etc_t:s0

Expected Results:
Privoxy should be allowed to modify /etc/privoxy/default.action.

Additional info:
To fix this, I ran

semanage fcontext -t privoxy_etc_rw_t -f -- -a /etc/privoxy/default\.action

This is similar to BZ 174301 - I should have included default.action when I
wrote that ticket.

Comment 1 Carsten Clasohm 2007-06-02 15:05:58 UTC
This problem is still present in Fedora 7, with privoxy-3.0.6-7.fc7 and

In addition, the semanage command I used on FC6 now throws a segmentation fault.

kernel: semanage[10284]: segfault at 0000000000000000 rip 00002aaaafa06b49 rsp
00007fffa93ed200 error 4

Comment 2 Bug Zapper 2008-04-04 03:38:23 UTC
Fedora apologizes that these issues have not been resolved yet. We're
sorry it's taken so long for your bug to be properly triaged and acted
on. We appreciate the time you took to report this issue and want to
make sure no important bugs slip through the cracks.

If you're currently running a version of Fedora Core between 1 and 6,
please note that Fedora no longer maintains these releases. We strongly
encourage you to upgrade to a current Fedora release. In order to
refocus our efforts as a project we are flagging all of the open bugs
for releases which are no longer maintained and closing them.

If this bug is still open against Fedora Core 1 through 6, thirty days
from now, it will be closed 'WONTFIX'. If you can reporduce this bug in
the latest Fedora version, please change to the respective version. If
you are unable to do this, please add a comment to this bug requesting
the change.

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we are following is outlined here:

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.

And if you'd like to join the bug triage team to help make things
better, check out http://fedoraproject.org/wiki/BugZappers

Comment 3 Carsten Clasohm 2008-04-06 15:37:28 UTC
This problem still exists in Fedora 8. Here's the AVC denied message:

avc: denied { write } for pid=7048 comm="privoxy" name="user.action" dev=dm-0
ino=5124974 scontext=system_u:system_r:privoxy_t:s0
tcontext=unconfined_u:object_r:etc_t:s0 tclass=file 

To fix this, I ran

semanage fcontext -t privoxy_etc_rw_t -f -- -a /etc/privoxy/user\.action 
semanage fcontext -t privoxy_etc_rw_t -f -- -a /etc/privoxy/default\.action 
restorecon -Rv /etc/privoxy

Comment 4 Daniel Walsh 2008-04-08 12:28:19 UTC
Fixed in selinux-policy-3.0.8-99.fc8

Comment 5 Daniel Walsh 2008-11-17 22:02:29 UTC
Closing all bugs that have been in modified for over a month.  Please reopen if the bug is not actually fixed.