Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1374572

Summary: SELinux prevents PAM in cockpit-session from resetting expired passwords
Product: Red Hat Enterprise Linux 7 Reporter: Stef Walter <stefw>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED CURRENTRELEASE QA Contact: Milos Malik <mmalik>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.3CC: lvrabec, mgrepl, mmalik, plautrba, pvrabec, ssekidde, stefw
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: selinux-policy-3.13.1-100.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-23 12:52:03 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:

Description Stef Walter 2016-09-09 06:09:09 UTC
Description of problem:

SELinux prevents the PAM stack running in cockpit-session from doing the usual reset of an expired password:

Unexpected journal message 'type=1400 audit(1473362821.508:6): avc:  denied  { search } for  pid=971 comm="cockpit-session" name="cracklib" dev="vda3" ino=105006 scontext=system_u:system_r:cockpit_session_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir'
Unexpected journal message 'type=1400 audit(1473362821.511:7): avc:  denied  { read } for  pid=971 comm="cockpit-session" name="pw_dict.pwd" dev="vda3" ino=105282 scontext=system_u:system_r:cockpit_session_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=file'
Unexpected journal message 'type=1400 audit(1473362821.513:8): avc:  denied  { open } for  pid=971 comm="cockpit-session" path="/usr/share/cracklib/pw_dict.pwd" dev="vda3" ino=105282 scontext=system_u:system_r:cockpit_session_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=file'
Unexpected journal message 'type=1400 audit(1473362821.514:9): avc:  denied  { getattr } for  pid=971 comm="cockpit-session" path="/usr/share/cracklib/pw_dict.pwi" dev="vda3" ino=105283 scontext=system_u:system_r:cockpit_session_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=file'
Unexpected journal message 'type=1400 audit(1473362821.549:10): avc:  denied  { write } for  pid=971 comm="cockpit-session" name=".pwd.lock" dev="vda3" ino=8592827 scontext=system_u:system_r:cockpit_session_t:s0 tcontext=system_u:object_r:passwd_file_t:s0 tclass=file'
Unexpected journal message 'type=1400 audit(1473362821.569:11): avc:  denied  { create } for  pid=971 comm="cockpit-session" name="nshadow" scontext=system_u:system_r:cockpit_session_t:s0 tcontext=system_u:object_r:shadow_t:s0 tclass=file'
Unexpected journal message 'type=1400 audit(1473362821.571:12): avc:  denied  { write } for  pid=971 comm="cockpit-session" path="/etc/nshadow" dev="vda3" ino=9404257 scontext=system_u:system_r:cockpit_session_t:s0 tcontext=system_u:object_r:shadow_t:s0 tclass=file'
Unexpected journal message 'type=1400 audit(1473362821.572:13): avc:  denied  { setattr } for  pid=971 comm="cockpit-session" name="nshadow" dev="vda3" ino=9404257 scontext=system_u:system_r:cockpit_session_t:s0 tcontext=system_u:object_r:shadow_t:s0 tclass=file'

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

 selinux-policy-targeted-3.13.1-93.el7.noarch
 docker-selinux-1.10.3-46.el7.10.x86_64
 selinux-policy-3.13.1-93.el7.noarch

How reproducible:

Happens regularly in Cockpit integration testing:

https://fedorapeople.org/groups/cockpit/logs/pull-4993-ca895051-verify-rhel-7/log

Comment 1 Stef Walter 2016-09-09 06:09:25 UTC
Broken feature: https://github.com/cockpit-project/cockpit/pull/4993

Comment 5 Stef Walter 2016-09-09 18:12:31 UTC
Tracker for when this happens during Cockpit integration tests:

https://github.com/cockpit-project/cockpit/issues/5010

Similar Fedora bug: 

https://bugzilla.redhat.com/show_bug.cgi?id=1374262