#48378 slapi_sdn_dup should check if sdn is NULL
Closed: wontfix by mreynolds. Opened by lkrispen.

in slapi_sdn_dup() always a new sdn is allocated and returned.

But if it is called for a NULL dn, the duplicate should also be NULL


If NULL sdn is passed, the current slapi_sdn_dup generates and returns an empty Slapi_DN instead of NULL.

The fix is straightforward (a preliminary patch is attached). But there are so many places where slapi_sdn_dup is called, and it is not easy to verify if the returned value is NULL in each case. Pushing it to 1.4.

{{{
$ egrep -l slapi_sdn_dup slapd/.c slapd//.c plugins//*.c
slapd/add.c
slapd/backend.c
slapd/bind.c
slapd/dn.c
slapd/dse.c
slapd/modrdn.c
slapd/operation.c
slapd/opshared.c
slapd/plugin.c
slapd/pw.c
slapd/uuid.c
slapd/back-ldbm/id2entry.c
slapd/back-ldbm/ldbm_add.c
slapd/back-ldbm/ldbm_delete.c
slapd/back-ldbm/ldbm_modrdn.c
slapd/back-ldbm/vlv_srch.c
plugins/acctpolicy/acct_init.c
plugins/acl/aclanom.c
plugins/automember/automember.c
plugins/chainingdb/cb_utils.c
plugins/dna/dna.c
plugins/memberof/memberof.c
plugins/memberof/memberof_config.c
plugins/mep/mep.c
plugins/pam_passthru/pam_ptpreop.c
plugins/referint/referint.c
plugins/replication/cl4_api.c
plugins/replication/repl5_agmt.c
plugins/replication/repl5_mtnode_ext.c
plugins/replication/repl5_replica.c
plugins/replication/urp.c
plugins/replication/windows_private.c
plugins/replication/windows_protocol_util.c
plugins/roles/roles_cache.c
}}}

Metadata Update from @nhosoi:
- Issue assigned to nhosoi
- Issue set to the milestone: 1.4 backlog

Metadata Update from @spichugi:
- Issue assigned to spichugi (was: nhosoi)

Metadata Update from @spichugi:
- Assignee reset

Metadata Update from @mreynolds:
- Custom field reviewstatus adjusted to None
- Issue close_status updated to: wontfix
- Issue status updated to: Closed (was: Open)

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/1709

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