From 3a42914d462205d84ebb21ec20fac83f15cfa333 Mon Sep 17 00:00:00 2001 From: sebthom Date: Thu, 5 Jun 2025 20:43:09 +0200 Subject: [PATCH] fix: "ldap_modify: No such attribute (16)" when TLS is disabled Fixes the following start error when TLS is disabled: ``` Executing [ldapmodify /tmp/tls.ldif]... SASL/EXTERNAL authentication started SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth SASL SSF: 0 ldap_modify: No such attribute (16) additional info: modify/delete: olcTLSCertificateFile: no such attribute modifying entry "cn=config" ``` --- image/run.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/image/run.sh b/image/run.sh index 7bba711..08d2c9c 100644 --- a/image/run.sh +++ b/image/run.sh @@ -344,7 +344,12 @@ for _ in {1..8}; do fi sleep 1 done -ldif modify -Y EXTERNAL /tmp/tls.ldif +if [[ ${LDAP_TLS_ENABLED} == true ]]; then + ldif modify -Y EXTERNAL /tmp/tls.ldif +else + ldif modify -c -Y EXTERNAL /tmp/tls.ldif || true # ignore "ldap_modify: No such attribute (16)" +fi + rm -f /tmp/tls.ldif /etc/init.d/slapd stop | log INFO