RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1265699 - autofs only creates files with default_t SElinux context
Summary: autofs only creates files with default_t SElinux context
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: autofs
Version: 7.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Ian Kent
QA Contact: Filesystem QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-23 13:48 UTC by Stanislav Zidek
Modified: 2015-09-24 23:37 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-09-24 23:37:32 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Stanislav Zidek 2015-09-23 13:48:27 UTC
Description of problem:
I was testing slightly complex scenario involving connecting by ssh to a machine that has home directories of users on NFS fs accessed through autofs. The problem was that sshd could not read users' authorized_keys file because of their default_t context

Version-Release number of selected component (if applicable):
autofs-5.0.7-53.el7

How reproducible:
always

Steps to Reproduce:
1. create nfs share
2. configure it to be mounted by autofs
3. check SElinux contexts of mounted files

Actual results:
drwxr-xr-x. root root unconfined_u:object_r:default_t:s0 /home/nfs

Expected results:
drwxr-xr-x. root root system_u:object_r:nfs_t:s0       /home/nfs/

Additional info:

* /etc/auto.master contains:
/home /etc/auto.nfs

* cat /etc/auto.nfs
nfs -fstype=nfs4,rw,async,soft,intr,fscontext=system_u:object_r:nfs_t:s0 127.0.0.1:/nfs-homes

(I tried context, fscontext and defcontext)

Comment 1 Ian Kent 2015-09-24 08:00:00 UTC
Once mounted autofs is not involved in mounted file system
operations.

Are you sure that this doesn't happen if the nfs file
system is manually mounted?

Can you provide a full debug log so we can check that the
context option is being correctly passed to the mount of
the nfs file system?


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