https://bugs.openldap.org/show_bug.cgi?id=10231
Issue ID: 10231 Summary: slapadd segfault on non-configured backend Product: OpenLDAP Version: 2.6.8 Hardware: All OS: All Status: UNCONFIRMED Keywords: needs_review Severity: normal Priority: --- Component: slapd Assignee: bugs@openldap.org Reporter: hyc@openldap.org Target Milestone: ---
If the LDIF being loaded corresponds to a different backend than the one specified (or the default backend, if none was specified), and the specified backend's configuration is incomplete and lacks a suffix, slapadd will SEGV when trying to print the error message about the LDIF not matching the specified backend, because it tries to print the suffix but the suffix is NULL.
E.g. using this setup:
### mkdir dumb dumb/db cat > dumb/slapd.conf <<EOF include schema/core.schema
backend ldif database ldif directory dumb/db EOF
slapd -Ta -f dumb/slapd.conf -l schema/inetorgperson.ldif ###
When fixed, the normal error message will be shown instead:
slapadd: line 1: database #1 ((null)) not configured to hold "cn=inetorgperson,cn=schema,cn=config"; did you mean to use database #0 (cn=config)? Closing DB...
https://bugs.openldap.org/show_bug.cgi?id=10231
Howard Chu hyc@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |TEST
--- Comment #1 from Howard Chu hyc@openldap.org --- Fixed in git aa31963e44e8e89bf7752a39d19c78b22c3711e8
https://bugs.openldap.org/show_bug.cgi?id=10231
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords|needs_review |
https://bugs.openldap.org/show_bug.cgi?id=10231
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |2.5.19
https://bugs.openldap.org/show_bug.cgi?id=10231
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|TEST |FIXED
--- Comment #2 from Quanah Gibson-Mount quanah@openldap.org --- RE26:
• 8350e24c by Howard Chu at 2024-06-28T17:01:55+00:00 ITS#10231 slapadd: check for NULL suffix in error message
RE25:
• 12d105b1 by Howard Chu at 2024-06-28T17:02:46+00:00 ITS#10231 slapadd: check for NULL suffix in error message
https://bugs.openldap.org/show_bug.cgi?id=10231
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |VERIFIED