Bug 725414 - Targeted: add rule for ssh-keygen to be able to create .ssh folder with correct context
Summary: Targeted: add rule for ssh-keygen to be able to create .ssh folder with corre...
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: selinux-policy
Version: 6.1
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: Milos Malik
Depends On:
Blocks: RHEL62CCC 846801 846802
TreeView+ depends on / blocked
Reported: 2011-07-25 12:15 UTC by Miroslav Vadkerti
Modified: 2012-10-15 13:58 UTC (History)
2 users (show)

Clone Of:
Last Closed: 2011-12-06 10:09:49 UTC

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1511 normal SHIPPED_LIVE selinux-policy bug fix and enhancement update 2011-12-06 00:39:17 UTC

Description Miroslav Vadkerti 2011-07-25 12:15:17 UTC
Description of problem:
When running ssh-keygen as a non-root user (under unconfined_t) and the .ssh folder does not exist the tool creates .ssh folder with incorrect context. As all other tools from the ssh package create the .ssh folder with correct context the ssh-keygen tool should behave the same.

This custom module solves this issue:
policy_module(ssh-keygen, 1.1)
        type unconfined_t;
        role unconfined_r;
ssh_run_keygen(unconfined_t, unconfined_r)

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

How reproducible:

Steps to Reproduce:
1. login as non-root user
2. rm -rf ~/.ssh 
3. ssh-keygen
4. ls -dZ ~/.ssh
Actual results:
drwx------. test test unconfined_u:object_r:user_home_t:SystemLow .ssh/

Expected results:
drwx------. test test unconfined_u:object_r:ssh_home_t:SystemLow .ssh/

Additional info:
Test case for this scenario is a part of CCC testing.

Comment 2 Miroslav Grepl 2011-08-01 11:42:34 UTC
Fixed in selinux-policy-3.7.19-106.el6

Comment 9 errata-xmlrpc 2011-12-06 10:09:49 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


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