Bug 465219 - man page ftpd_selinux bugs
Summary: man page ftpd_selinux bugs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: selinux-policy
Version: 5.1
Hardware: All
OS: Linux
high
medium
Target Milestone: rc
: ---
Assignee: Daniel Walsh
QA Contact: BaseOS QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-10-02 08:47 UTC by Lutz Lange
Modified: 2009-01-20 21:29 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-20 21:29:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:0163 0 normal SHIPPED_LIVE selinux-policy bug fix and enhancement update 2009-01-20 16:05:21 UTC

Description Lutz Lange 2008-10-02 08:47:35 UTC
Description of problem:
this man page states that you should do this:
If you want to make this permanant, i.e. survive a relabel, you must  add
       an entry to the file_contexts.local file.

       /etc/selinux/POLICYTYPE/contexts/files/file_contexts.local
              /var/ftp(/.*)? system_u:object_r:public_content_t  /var/ftp/incom-
              ing(/.*)? system_u:object_r:public_content_rw_t

There are two problems here.
1. this shows one line to put into file_contexts.local. This will result in an error, since it actually is two lines. 
Suggested Action: add a newline between ...:public_content_t /var/ft...

2. on rhel5 this does not actually do what you want, since the now first line allready exists and confilicts with an existing poklicy.
Suggested action: rewrite the man page to reflect this. Something like: add only the last line if your default policy includes a preset context for /var/ftp(/.*)? already.



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


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Daniel Walsh 2008-10-10 19:14:57 UTC
Fixed in selinux-policy-2.4.6-164.el5

Comment 5 Lutz Lange 2008-10-17 09:24:20 UTC
Today i found out that you should indeed not edit  /etc/selinux/POLICYTYPE/contexts/files/file_contexts.local
manually since it is managed dynamically by libsemanage.

Instead i should use: 
semanage fcontext -a -t public_content_rw_t /var/ftp/incoming(/.*)?

If this is already in your fix, please disregard this comment.

Comment 6 Daniel Walsh 2008-10-17 12:43:34 UTC
That is what the man page says.

Comment 9 errata-xmlrpc 2009-01-20 21:29:53 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0163.html


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