Bug 1077809
Summary: | useradd not assigning correct SELinux user to contexts of home directory files | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Tomas Mraz <tmraz> |
Component: | shadow-utils | Assignee: | Tomas Mraz <tmraz> |
Status: | CLOSED ERRATA | QA Contact: | Stanislav Zidek <szidek> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 7.0 | CC: | mgrepl, szidek, tmraz |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | shadow-utils-4.1.5.1-15.el7 | Doc Type: | Bug Fix |
Doc Text: |
Cause:
The useradd assigned the SELinux user to the new user being created after creating and populating the home directory of the user.
Consequence:
The SELinux contexts of the home directory files were incorrect.
Fix:
The SELinux user is assigned to the newly created user before populating the home directory.
Result:
The SELinux contexts on the home directory files for newly created users are now correct.
|
Story Points: | --- |
Clone Of: | 955769 | Environment: | |
Last Closed: | 2014-09-15 11:13:48 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1110706 |
Description
Tomas Mraz
2014-03-18 15:40:03 UTC
*** Bug 1134450 has been marked as a duplicate of this bug. *** Mirek, do you have any idea what could be wrong here? semanage_commit() is called and only then the home dir is created and files copied. If the semanage login entry is present before running useradd, the contexts are correct. On RHEL-6 where the code is the same except semanage command is used instead of libsemanage calls, it works correctly. It seems that adding matchpathcon_fini() after semanage_commit() fixes this. 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. http://rhn.redhat.com/errata/RHBA-2014-1191.html |