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 1599726

Summary: selinux blocks slapd access to cracklib
Product: Red Hat Enterprise Linux 7 Reporter: mreynolds
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Milos Malik <mmalik>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.7-AltCC: lvrabec, mgrepl, mmalik, mreynolds, plautrba, ssekidde, vashirov
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-30 10:06:46 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 mreynolds 2018-07-10 12:43:35 UTC
Description of problem:

We can not use cracklib dictionary checking in our aplication (389-ds-base and freeipa) because selinux blocks access to the cracklib dictionary files.  This was supposed to be fixed in RHEL 6, but it's a problem on RHEL and Fedora 28.

BZ - 1175188 - selinux blocks slapd access to cracklib

I tested with:

selinux-policy-3.14.1-32.fc28.noarch
libselinux-2.8-1.fc28.x86_64

Comment 2 Milos Malik 2018-07-10 12:48:43 UTC
Please collect SELinux denials triggered by your scenario:

# ausearch -m avc -m user_avc -m selinux_err -m user_selinux_err -i -ts today

and attach them here.

Comment 3 mreynolds 2018-07-10 13:06:51 UTC
Here it is (thanks!):


[root@localhost password]# ausearch -m avc -m user_avc -m selinux_err -m user_selinux_err -i -ts today
----
type=AVC msg=audit(07/10/2018 07:57:30.870:1886) : avc:  denied  { search } for  pid=24383 comm=ns-slapd name=cracklib dev="dm-0" ino=527843 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir permissive=0 
----
type=AVC msg=audit(07/10/2018 07:57:30.870:1887) : avc:  denied  { search } for  pid=24383 comm=ns-slapd name=cracklib dev="dm-0" ino=527843 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir permissive=0 
----
type=AVC msg=audit(07/10/2018 07:57:30.871:1888) : avc:  denied  { search } for  pid=24383 comm=ns-slapd name=cracklib dev="dm-0" ino=527843 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir permissive=0 
----
type=AVC msg=audit(07/10/2018 07:57:30.871:1889) : avc:  denied  { search } for  pid=24383 comm=ns-slapd name=cracklib dev="dm-0" ino=527843 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir permissive=0 
----
type=AVC msg=audit(07/10/2018 08:16:06.290:1896) : avc:  denied  { search } for  pid=6089 comm=ns-slapd name=cracklib dev="dm-0" ino=527843 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir permissive=0 
----
type=AVC msg=audit(07/10/2018 08:16:06.290:1897) : avc:  denied  { search } for  pid=6089 comm=ns-slapd name=cracklib dev="dm-0" ino=527843 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir permissive=0 
----
type=AVC msg=audit(07/10/2018 08:16:06.293:1898) : avc:  denied  { search } for  pid=6089 comm=ns-slapd name=cracklib dev="dm-0" ino=527843 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir permissive=0 
----
type=AVC msg=audit(07/10/2018 08:16:06.293:1899) : avc:  denied  { search } for  pid=6089 comm=ns-slapd name=cracklib dev="dm-0" ino=527843 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir permissive=0 
----
type=AVC msg=audit(07/10/2018 08:20:41.530:1902) : avc:  denied  { search } for  pid=13180 comm=ns-slapd name=cracklib dev="dm-0" ino=527843 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir permissive=0 
----
type=AVC msg=audit(07/10/2018 08:20:41.530:1903) : avc:  denied  { search } for  pid=13180 comm=ns-slapd name=cracklib dev="dm-0" ino=527843 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir permissive=0 
----
type=AVC msg=audit(07/10/2018 08:20:41.536:1904) : avc:  denied  { search } for  pid=13180 comm=ns-slapd name=cracklib dev="dm-0" ino=527843 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir permissive=0 
----
type=AVC msg=audit(07/10/2018 08:20:41.536:1905) : avc:  denied  { search } for  pid=13180 comm=ns-slapd name=cracklib dev="dm-0" ino=527843 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir permissive=0 
----
type=AVC msg=audit(07/10/2018 08:22:39.080:1908) : avc:  denied  { search } for  pid=20443 comm=ns-slapd name=cracklib dev="dm-0" ino=527843 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir permissive=0 
----
type=AVC msg=audit(07/10/2018 08:22:39.080:1909) : avc:  denied  { search } for  pid=20443 comm=ns-slapd name=cracklib dev="dm-0" ino=527843 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir permissive=0 
----
type=AVC msg=audit(07/10/2018 08:22:39.083:1910) : avc:  denied  { search } for  pid=20443 comm=ns-slapd name=cracklib dev="dm-0" ino=527843 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir permissive=0 
----
type=AVC msg=audit(07/10/2018 08:22:39.083:1911) : avc:  denied  { search } for  pid=20443 comm=ns-slapd name=cracklib dev="dm-0" ino=527843 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir permissive=0 
----
type=AVC msg=audit(07/10/2018 08:28:54.318:1914) : avc:  denied  { search } for  pid=10460 comm=ns-slapd name=cracklib dev="dm-0" ino=527843 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir permissive=0 
----
type=AVC msg=audit(07/10/2018 08:28:54.318:1915) : avc:  denied  { search } for  pid=10460 comm=ns-slapd name=cracklib dev="dm-0" ino=527843 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir permissive=0 
----
type=AVC msg=audit(07/10/2018 08:28:54.319:1916) : avc:  denied  { search } for  pid=10460 comm=ns-slapd name=cracklib dev="dm-0" ino=527843 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir permissive=0 
----
type=AVC msg=audit(07/10/2018 08:28:54.319:1917) : avc:  denied  { search } for  pid=10460 comm=ns-slapd name=cracklib dev="dm-0" ino=527843 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir permissive=0 
----
type=USER_AVC msg=audit(07/10/2018 08:29:00.958:1920) : pid=831 uid=dbus auid=unset ses=unset subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  received setenforce notice (enforcing=0)  exe=/usr/bin/dbus-daemon sauid=dbus hostname=? addr=? terminal=?' 
----
type=USER_AVC msg=audit(07/10/2018 08:29:05.127:1921) : pid=1 uid=root auid=unset ses=unset subj=system_u:system_r:init_t:s0 msg='avc:  received setenforce notice (enforcing=0)  exe=/usr/lib/systemd/systemd sauid=root hostname=? addr=? terminal=?' 
----
type=AVC msg=audit(07/10/2018 08:29:09.623:1923) : avc:  denied  { read } for  pid=10728 comm=ns-slapd name=pw_dict.pwd dev="dm-0" ino=529312 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=file permissive=1 
----
type=AVC msg=audit(07/10/2018 08:29:09.623:1924) : avc:  denied  { open } for  pid=10728 comm=ns-slapd path=/usr/share/cracklib/pw_dict.pwd dev="dm-0" ino=529312 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=file permissive=1 
----
type=AVC msg=audit(07/10/2018 08:29:09.623:1925) : avc:  denied  { getattr } for  pid=10728 comm=ns-slapd path=/usr/share/cracklib/pw_dict.pwi dev="dm-0" ino=529313 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=file permissive=1

Comment 7 errata-xmlrpc 2018-10-30 10:06:46 UTC
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.

https://access.redhat.com/errata/RHBA-2018:3111