Bug 782078 - Please backport sftp+chroot+SELinux changes for Rawihde/RHEL6 to Fedora16
Summary: Please backport sftp+chroot+SELinux changes for Rawihde/RHEL6 to Fedora16
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: openssh
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Petr Lautrbach
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-01-16 13:22 UTC by Miroslav Grepl
Modified: 2012-02-08 22:55 UTC (History)
4 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2012-02-08 22:55:58 UTC


Attachments (Terms of Use)

Description Miroslav Grepl 2012-01-16 13:22:30 UTC
Description of problem:

In a chrooted sftp environment, SELinux is preventing users from uploading new files to their home directories.

sftp/chroot option either runs in the old sftpd_t domain or in the sshd_t domain which is not correct.


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


How reproducible:

https://bugzilla.redhat.com/show_bug.cgi?id=729648

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


Expected results:


Additional info:

Comment 1 Petr Lautrbach 2012-02-02 16:24:10 UTC
With removed openssh-5.8p1-sftpcontext.patch and with added openssh-5.8p2-sftp-chroot.patch (similar to openssh-5.9p1-sftp-chroot.patch from Rawhide) I get this behaviour:

1.
ChrootDirectory none
Subsystem       sftp internal-sftp

system_u:system_r:sshd_t:s0-s0:c0.c1023  /usr/sbin/sshd -D
system_u:system_r:sshd_t:s0-s0:c0.c1023   \_ sshd: staff [priv]
system_u:system_r:sshd_t:s0-s0:c0.c1023       \_ sshd: staff@notty
staff_u:staff_r:staff_t:s0                      \_ sshd: staff@internal-sftp

2.
ChrootDirectory none
Subsystem       sftp    /usr/libexec/openssh/sftp-server

system_u:system_r:sshd_t:s0-s0:c0.c1023  /usr/sbin/sshd -D
system_u:system_r:sshd_t:s0-s0:c0.c1023   \_ sshd: staff [priv]
system_u:system_r:sshd_t:s0-s0:c0.c1023       \_ sshd: staff@notty
staff_u:staff_r:staff_t:s0                     \_ /usr/libexec/openssh/sftp-server

3. 
ChrootDirectory /chroot
Subsystem       sftp internal-sftp

system_u:system_r:sshd_t:s0-s0:c0.c1023      /usr/sbin/sshd -D
system_u:system_r:sshd_t:s0-s0:c0.c1023       \_ sshd: staff [priv]
system_u:system_r:chroot_user_t:s0-s0:c0.c1023  \_ sshd: staff@notty
system_u:system_r:chroot_user_t:s0-s0:c0.c1023    \_ sshd: staff@internal-sftp


Is this what you expect?

Comment 2 Miroslav Grepl 2012-02-02 16:28:09 UTC
ad 1) yes
ad 2) yes
ad 3) yes

Comment 3 Fedora Update System 2012-02-06 21:43:30 UTC
openssh-5.8p2-24.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/openssh-5.8p2-24.fc16

Comment 4 Fedora Update System 2012-02-07 07:59:01 UTC
Package openssh-5.8p2-24.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing openssh-5.8p2-24.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-1421/openssh-5.8p2-24.fc16
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2012-02-08 22:55:58 UTC
openssh-5.8p2-24.fc16 has been pushed to the Fedora 16 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.