Bug 782078 - Please backport sftp+chroot+SELinux changes for Rawihde/RHEL6 to Fedora16
Please backport sftp+chroot+SELinux changes for Rawihde/RHEL6 to Fedora16
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: openssh (Show other bugs)
16
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Petr Lautrbach
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-16 08:22 EST by Miroslav Grepl
Modified: 2012-02-08 17:55 EST (History)
4 users (show)

See Also:
Fixed In Version: openssh-5.8p2-24.fc16
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-02-08 17:55:58 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Miroslav Grepl 2012-01-16 08:22:30 EST
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 11:24:10 EST
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 11:28:09 EST
ad 1) yes
ad 2) yes
ad 3) yes
Comment 3 Fedora Update System 2012-02-06 16:43:30 EST
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 02:59:01 EST
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 17:55:58 EST
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.