samll clean up

This commit is contained in:
Daniel Falcón Ruiz 2021-07-08 13:53:25 +01:00
parent b38c09373f
commit efd808c46c
1 changed files with 5 additions and 5 deletions

View File

@ -267,15 +267,15 @@ EOF
# Returns:
# None
#########################
ldap_disable_anon_bindings() {
info "Disable LDAP anonymous bindings"
cat > "${LDAP_SHARE_DIR}/ldap_disable_anon_bind.ldif" << EOF
ldap_disable_anon_binding() {
info "Disable LDAP anonymous binding"
cat > "${LDAP_SHARE_DIR}/disable_anon_bind.ldif" << EOF
dn: cn=config
changetype: modify
add: olcDisallows
olcDisallows: bind_anon
EOF
debug_execute ldapmodify -Y EXTERNAL -H "ldapi:///" -f "${LDAP_SHARE_DIR}/ldap_disable_anon_bind.ldif"
debug_execute ldapmodify -Y EXTERNAL -H "ldapi:///" -f "${LDAP_SHARE_DIR}/disable_anon_bind.ldif"
}
########################
@ -439,7 +439,7 @@ ldap_initialize() {
ldap_start_bg
ldap_admin_credentials
if [ "$LDAP_ALLOW_ANON_BINDING" != 'yes' ]; then
ldap_disable_anon_bindings
ldap_disable_anon_binding
fi
if is_boolean_yes "$LDAP_ENABLE_TLS"; then
ldap_configure_tls