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 841933 - pwconv create /etc/shadow with bad SELinux context
Summary: pwconv create /etc/shadow with bad SELinux context
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: shadow-utils
Version: 7.0
Hardware: All
OS: Linux
high
low
Target Milestone: rc
: ---
Assignee: Peter Vrabec
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-20 15:14 UTC by Miroslav Vadkerti
Modified: 2012-07-23 15:20 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-07-23 15:20:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Miroslav Vadkerti 2012-07-20 15:14:56 UTC
Description of problem:
pwconv creates /etc/shadow with incorrect context -> this then breaks the system  quite bad.

# ll -Z /etc/shadow*
-r--------. root root system_u:object_r:shadow_t:s0    /etc/shadow
----------. root root system_u:object_r:shadow_t:s0    /etc/shadow-
# pwunconv
# pwconv 
# ll -Z /etc/shadow*
-r--------. root root unconfined_u:object_r:etc_t:s0   /etc/shadow
----------. root root system_u:object_r:shadow_t:s0    /etc/shadow-

Version-Release number of selected component (if applicable):
shadow-utils-4.1.4.3-14.el7

How reproducible:
100%

Steps to Reproduce:
1. pwunconv
2. pwconv
3. ll -Z /etc/shadow*
  
Actual results:
/etc/shadow has incorrect SELinux context

Expected results:
/etc/shadow has correct SELinux context

Comment 1 Peter Vrabec 2012-07-23 15:20:48 UTC
fixed in shadow-utils >= 4.1.5-2

* Wed Mar 22 2012 Peter Vrabec <pvrabec> - 2:4.1.5-2
- fix selinux context handling
- reset selinux context on files copied from skel


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