#3309 Coverity warns about an unused value in IPA sudo code
Closed: Fixed None Opened 7 years ago by jhrozek.

 943    for (i = 0; table[i].ipa != NULL; i++) {
    value_overwrite: Overwriting previous write to ret with value from sysdb_attrs_get_string_array(rule->attrs, table[i].ipa, tmp_ctx, &values).
 944        ret = sysdb_attrs_get_string_array(rule->attrs, table[i].ipa,
 945                                           tmp_ctx, &values);
 946        if (ret == ENOENT) {
 947            continue;
 948        } else if (ret != EOK) {
 949            DEBUG(SSSDBG_CRIT_FAILURE, "Unable to read attribute "
 950                  "%s [%d]: %s\n", table[i].ipa, ret, sss_strerror(ret));
 951            goto done;
 952        }
 953
 954        for (j = 0; values[j] != NULL; j++) {
 955            if (table[i].conv_fn != NULL) {
 956                value = table[i].conv_fn(tmp_ctx, conv, values[j], &skip_entry);
 957                if (value == NULL) {
 958                    if (skip_entry) {
    CID 14791 (#1 of 1): Unused value (UNUSED_VALUE)assigned_value: Assigning value 2 to ret here, but that stored value is overwritten before it can be used.
 959                        ret = ENOENT;
 960                        continue;
 961                    } else {
    value_overwrite: Overwriting previous write to ret with value 12.
 962                        ret = ENOMEM;
 963                        goto done;
 964                    }
 965                }
 966            } else {
 967                value = values[j];
 968            }
 969
    value_overwrite: Overwriting previous write to ret with value from sysdb_attrs_add_string_safe(attrs, table[i].sudo, value).

Fields changed

owner: somebody => pcech

Fields changed

status: new => assigned

master:

sssd-1-14:

milestone: NEEDS_TRIAGE => SSSD 1.15.1
resolution: => fixed
status: assigned => closed

Fields changed

rhbz: => 0

Metadata Update from @jhrozek:
- Issue assigned to pcech
- Issue set to the milestone: SSSD 1.15.1

7 years ago

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

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.

Login to comment on this ticket.

Metadata