#50445 ldbm_config_*_set functions need to validate valuse in apply=0 mode
Closed: wontfix 3 years ago by spichugi. Opened 4 years ago by lkrispen.

The ldbm_config_*_set() functions can be called with apply value of 0 or 1. The idea is to check the validity of the attribute value without applying it. The idea behind this is that in dse.ldif "database" we do nt have transactions and need to check first that all attributes in a list of mods can be changend (apply=0) and then if everything is fine do it again with apply=1.

But unfortunately many functions, eg ldbm_config_db_cache_set() do nothing if called with apply=0, only with apply=1 they do the checks


Metadata Update from @mreynolds:
- Custom field origin adjusted to None
- Custom field reviewstatus adjusted to None
- Issue set to the milestone: 1.4.2

4 years ago

There is another need for this to be fixed. There is a memory leak caused by ldbm_config_modify_entry_callback() which manipulates the list of mods in the pblock and if the check fails the mods will not be freed.
This can be fixed by:

 @@ -2525,11 +2525,11 @@ ldbm_config_modify_entry_callback(Slapi_PBlock *pb, Slapi_Entry *entryBefore, Sl
                              slapi_valueset_free(origvalues);
                          }
                      }
 +                    reapply_mods = 1; /* there is at least one mod we removed */
                  }
                  continue;
              }

 -            reapply_mods = 1; /* there is at least one mod we removed */
              /* when deleting a value, and this is the last or only value, set
                 the config param to its default value
                 when adding a value, if the value is set to its default value, replace

but this requires that config violations are detected already in the loop with apply=0

Metadata Update from @vashirov:
- Issue priority set to: normal
- Issue set to the milestone: 1.4.3 (was: 1.4.2)

4 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/3503

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix
- Issue status updated to: Closed (was: Open)

3 years ago

Login to comment on this ticket.

Metadata