https://bugs.openldap.org/show_bug.cgi?id=10219
Issue ID: 10219 Summary: Modify of olcDisabled by removing and adding a value invokes db_open twice Product: OpenLDAP Version: 2.6.7 Hardware: All OS: All Status: UNCONFIRMED Keywords: needs_review Severity: normal Priority: --- Component: slapd Assignee: bugs@openldap.org Reporter: nivanova@symas.com Target Milestone: ---
A database is enabled by default, and therefore a missing olcDisabled attribute is equivalent to a value of FALSE. This means that currently a modify operation that removes a olcDisabled value will invoke the db_open handler for that database, even if in the same modify operation a value of TRUE is added. A modify operation like this:
dn: olcDatabase={1}asyncmeta,cn=config changetype: modify delete: olcDisabled olcDisabled: FALSE - add: olcDisabled olcDisabled: TRUE -
will call both db_open and db_close. This could be potentially harmful if the backend type allocates memory on db_open like asyncmeta, for example. It is a rare case, but it is best to fix it just in case.
https://bugs.openldap.org/show_bug.cgi?id=10219
--- Comment #1 from Howard Chu hyc@openldap.org --- Side note - it's unusual to modify Boolean attributes this way, unless you want to ensure what the old value was before setting the new value. Otherwise you would just do a Modify/Replace.
https://bugs.openldap.org/show_bug.cgi?id=10219
--- Comment #2 from Nadezhda Ivanova nivanova@symas.com --- Sure, this is a corner case, but someone might still do it (my version of Directory Studio still does).
https://bugs.openldap.org/show_bug.cgi?id=10219
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |IN_PROGRESS Ever confirmed|0 |1 Target Milestone|--- |2.6.9 Keywords|needs_review |
--- Comment #3 from Quanah Gibson-Mount quanah@openldap.org --- https://git.openldap.org/openldap/openldap/-/merge_requests/707
https://bugs.openldap.org/show_bug.cgi?id=10219
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|2.6.9 |2.5.19
https://bugs.openldap.org/show_bug.cgi?id=10219
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|IN_PROGRESS |RESOLVED
--- Comment #4 from Quanah Gibson-Mount quanah@openldap.org --- head:
• 6b4b68b1 by Nadezhda Ivanova at 2024-06-13T18:41:25+00:00 ITS#10219 Modify of olcDisabled by removing and adding a value invokes db_open twice
RE26:
• 532b2e60 by Nadezhda Ivanova at 2024-06-28T16:58:12+00:00 ITS#10219 Modify of olcDisabled by removing and adding a value invokes db_open twice
RE25:
• 230bd39c by Nadezhda Ivanova at 2024-06-28T16:58:05+00:00 ITS#10219 Modify of olcDisabled by removing and adding a value invokes db_open twice