Bug 433429 - genhomedircon creates duplicate entries
genhomedircon creates duplicate entries
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: policycoreutils (Show other bugs)
5.1
All Linux
low Severity low
: rc
: ---
Assigned To: Daniel Walsh
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-19 03:55 EST by Christian Jung
Modified: 2009-01-20 17:00 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-20 17:00:31 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 Christian Jung 2008-02-19 03:55:35 EST
Description of problem:
genhomedircon creates entries in
/etc/selinux/targeted/contexts/files/file_contexts.homedirs to setup SELinux
labels for /home, /root,...

If one use has $HOME set to /usr/local/$USER, genhomedircon also add entries for
/usr/local. This is conflicting with existing entries in file_contexts.

Users see warning messages about duplicate entries:
/etc/selinux/targeted/contexts/files/file_contexts: Multiple same specifications
for /usr/local/lost\+found/.*.
/etc/selinux/targeted/contexts/files/file_contexts: Multiple same specifications
for /usr/local/\.journal.
/etc/selinux/targeted/contexts/files/file_contexts: Multiple same specifications
for /usr/local/lost\+found.

Version-Release number of selected component (if applicable):
policycoreutils-1.33.12-12.el5

How reproducible:
always

Steps to Reproduce:
1. create a new user with $HOME in /usr/local:
useradd -d /usr/local/test test
2. execute genhomedircon to update file_contexts.homedirs
genhomedircon
3. login to localhost with ssh:
ssh localhost
(this is only an example, other commands also throw warning messages)

Actual results:
warning messages (see above)

Expected results:
no warning message

Additional info:
genhomedircon should not create entries for directories which are already
included in file_contexts.
Comment 1 Daniel Walsh 2008-02-19 10:32:49 EST
Too late to put this into U2,  Should be fixed in U3.  For now, don't do that. 
Homedirs should not be in /usr/local.  If you have a service with a homedir in
/usr/local, it should have a shell of /sbin/nologin or /bin/false.  And/or have
a UID < 500.

Comment 2 RHEL Product and Program Management 2008-06-04 18:46:31 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.
Comment 3 Daniel Walsh 2008-09-17 16:01:34 EDT
Fixed in policycoreutils-1.33.12-14.1.el5
Comment 8 Daniel Walsh 2008-11-04 15:32:16 EST
Fixed in policycoreutils-1.33.12-14.2.el5
Comment 13 errata-xmlrpc 2009-01-20 17:00:31 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0206.html

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