#511 Switch statement missing a break causes wrong PAM error code to be returned
Closed: Fixed Opened by sgallagh.

From Coverity:

  846done:
  847    if (ret != EOK) {
  848        switch (ret) {
This case (value 2) is not terminated by a 'break' statement.
  849        case ENOENT:
  850            pd->pam_status = PAM_USER_UNKNOWN;
The above case falls through to this one.
  851        default:
  852            pd->pam_status = PAM_SYSTEM_ERR;
  853        }
  854        pam_reply(preq);
  855    }
  856    return EOK;

This would certainly cause incorrect error log messages. It would inappropriately record an internal system error instead of user unknown.


Fields changed

milestone: NEEDS_TRIAGE => SSSD 1.2.1

Fixed by 7ea81745ce5d131ad502baa7fcb5019f3d1f3d20

fixedin: => 1.2.1
keywords: => coverity
resolution: => fixed
status: new => closed

Fields changed

rhbz: => 0

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

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

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