Add conditional for setting authlogin_nsswitch_use_ldap selboolean

If selinux is enabled the authlogin_nsswitch_use_ldap Boolean must
be enabled. This setting allows LDAP communications to the confined
LDAP/server port. This change includes a conditional for enabling this
Boolean only when selinux is in use.

Change-Id: If985f2434d28fcd33198929bf61f2a3a82e601fe
Closes-Bug: #1695002
(cherry picked from commit 90704a6017)
This commit is contained in:
Jacob Liberman 2017-06-01 09:33:21 -05:00 committed by Juan Antonio Osorio Robles
parent fd20b306b0
commit 7ea37eaadc
1 changed files with 6 additions and 0 deletions

View File

@ -172,6 +172,12 @@ class tripleo::profile::base::keystone (
if $ldap_backend_enable {
validate_hash($ldap_backends_config)
if !str2bool($::selinux) {
selboolean { 'authlogin_nsswitch_use_ldap':
value => on,
persistent => true,
}
}
create_resources('::keystone::ldap_backend', $ldap_backends_config, {
create_domain_entry => $manage_domain,
})