#712 Unchecked return value in sdap_get_msg_dn and sdap_parse_entry
Closed: Fixed Opened by sgallagh.

Calling function "ldap_set_option" without checking return value.
No check of the return value of "ldap_set_option(sh->ldap, 49, &lerrno)".
  273    ldap_set_option(sh->ldap, LDAP_OPT_RESULT_CODE, &lerrno);
  274
  275    str = ldap_get_dn(sh->ldap, sm->msg);
  276    if (!str) {
  277        ldap_get_option(sh->ldap, LDAP_OPT_RESULT_CODE, &lerrno);
  278        DEBUG(1, ("ldap_get_dn failed: %d(%s)\n",
  279                  lerrno, ldap_err2string(lerrno)));
  280        return EIO;
  281    }

Also appears in {{{sdap_parse_entry()}}}

Calling function "ldap_set_option" without checking return value.
No check of the return value of "ldap_set_option(sh->ldap, 49, &lerrno)".
  107    ldap_set_option(sh->ldap, LDAP_OPT_RESULT_CODE, &lerrno);
  108
  109    attrs = sysdb_new_attrs(memctx);
  110    if (!attrs) return ENOMEM;
  111

summary: Unchecked return value in sdap_get_msg_dn => Unchecked return value in sdap_get_msg_dn and sdap_parse_entry

Fields changed

milestone: NEEDS_TRIAGE => SSSD 1.5.1

Fixed by
- 4cac4c6ebe76b3e1a40e437f9594553fdb870b81
- 6c1ec705cd9ebb49bf49778e0396e32fdf38f315

coverity: => 10002
resolution: => fixed
status: new => closed

Fields changed

coverity: 10002 => 10002,10003

Fields changed

milestone: SSSD 1.5.1 => SSSD 1.5.0

Fields changed

rhbz: => 0

Metadata Update from @sgallagh:
- Issue assigned to sbose
- Issue set to the milestone: SSSD 1.5.0

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

This issue has been cloned to Github and is available here:
- https://github.com/SSSD/sssd/issues/1754

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