Bug 1076847 - selinux prevents pure-ftpd from writing to xferlog /var/log/pureftpd.log
Summary: selinux prevents pure-ftpd from writing to xferlog /var/log/pureftpd.log
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 20
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-15 18:10 UTC by Tomas Dolezal
Modified: 2014-04-09 13:22 UTC (History)
4 users (show)

Fixed In Version: selinux-policy-3.12.1-149.fc20
Clone Of:
Environment:
Last Closed: 2014-04-09 13:22:19 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomas Dolezal 2014-03-15 18:10:40 UTC
Description of problem:
Source Context                system_u:system_r:ftpd_t:s0-s0:c0.c1023
Target Context                system_u:object_r:xferlog_t:s0
Target Objects                 [ file ]
Source                        pure-ftpd
Source Path                   /usr/sbin/pure-ftpd
Port                          <Unknown>
Host                          martouf.localdomain
Source RPM Packages           pure-ftpd-1.0.36-4.fc20.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-122.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     martouf.localdomain
Platform                      Linux martouf.localdomain 3.13.6-200.fc20.x86_64
                              #1 SMP Fri Mar 7 17:02:28 UTC 2014 x86_64 x86_64
Alert Count                   1
First Seen                    2014-03-15 18:58:10 CET
Last Seen                     2014-03-15 18:58:10 CET
Local ID                      5d9fc967-7c67-448f-83e7-d94d7cab3c09

Raw Audit Messages
type=AVC msg=audit(1394906290.159:401): avc:  denied  { write } for  pid=1282 comm="pure-ftpd" name="pureftpd.log" dev="dm-4" ino=786502 scontext=system_u:system_r:ftpd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:xferlog_t:s0 tclass=file


type=SYSCALL msg=audit(1394906290.159:401): arch=x86_64 syscall=open success=no exit=EACCES a0=7f80301e46d0 a1=20041 a2=180 a3=1 items=0 ppid=943 pid=1282 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=pure-ftpd exe=/usr/sbin/pure-ftpd subj=system_u:system_r:ftpd_t:s0-s0:c0.c1023 key=(null)

Hash: pure-ftpd,ftpd_t,xferlog_t,file,write


Version-Release number of selected component (if applicable):
pure-ftpd-selinux-1.0.36-4.fc20.x86_64

How reproducible:
always

Steps to Reproduce:
1. start the server (systemd.service)
2. transfer any file

Actual results:
selinux avc, log not written

Expected results:


Additional info:

Comment 1 Daniel Walsh 2014-03-16 21:29:28 UTC
commit b5a67f8b19ab5851f53a545a4ebe5f5a857c8d3f
 
allows this in Rawhide.

Comment 2 Fedora Update System 2014-03-31 14:05:53 UTC
selinux-policy-3.12.1-149.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-149.fc20

Comment 3 Fedora Update System 2014-04-02 09:04:00 UTC
Package selinux-policy-3.12.1-149.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.12.1-149.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-4604/selinux-policy-3.12.1-149.fc20
then log in and leave karma (feedback).

Comment 4 Tomas Dolezal 2014-04-05 17:19:45 UTC
confirmed working
selinux-policy-3.12.1-149.fc20.noarch

Comment 5 Fedora Update System 2014-04-09 13:22:19 UTC
selinux-policy-3.12.1-149.fc20 has been pushed to the Fedora 20 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.