URL:
https://github.com/SSSD/sssd/pull/883
Author: alexey-tikhonov
Title: #883: Minor fixes to util/sss_krb5
Action: opened
PR body:
"""
Main purpose of this patches is to resolve:
https://pagure.io/SSSD/sssd/issue/4081
It also fixes one coverity issue:
```
Error: DEADCODE (CWE-561):
sssd-2.2.3/src/util/sss_krb5.c:375: cond_const: Condition "(kt_err =
krb5_kt_next_entry(ctx, keytab, &entry, &cursor)) == 0", taking true branch.
Now the value of "kt_err" is equal to 0.
sssd-2.2.3/src/util/sss_krb5.c:406: const: At condition "kt_err != 0", the value
of "kt_err" must be equal to 0.
sssd-2.2.3/src/util/sss_krb5.c:406: dead_error_condition: The condition "kt_err !=
0" cannot be true.
sssd-2.2.3/src/util/sss_krb5.c:406: dead_error_line: Execution cannot reach the expression
"kt_err != -1765328202L" inside this statement: "if (kt_err != 0 &&
kt_err !...".
# 404|
# 405| /* check if we got any errors from krb5_kt_next_entry */
# 406|-> if (kt_err != 0 && kt_err != KRB5_KT_END) {
# 407| DEBUG(SSSDBG_CRIT_FAILURE, "Error while reading keytab.\n");
# 408| goto done;
```
"""
To pull the PR as Git branch:
git remote add ghsssd
https://github.com/SSSD/sssd
git fetch ghsssd pull/883/head:pr883
git checkout pr883