mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Fix assign instead of compare
Commit 53e0b2255d introduced a minor bug.
Instead of comparing errno to ENOENT, the check assigned ENOENT to
errno.
Coverity: CID 337082
See: https://pagure.io/freeipa/issue/4607
Signed-off-by: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
@@ -687,7 +687,7 @@ static int resolve_ktname(const char *keytab, char **ktname, char **err_msg)
|
||||
* root. For simplicity, only one level if indirection is resolved.
|
||||
*/
|
||||
if ((stat(keytab, &st) == -1) &&
|
||||
(errno = ENOENT) &&
|
||||
(errno == ENOENT) &&
|
||||
(lstat(keytab, &lst) == 0) &&
|
||||
(S_ISLNK(lst.st_mode))) {
|
||||
/* keytab is a dangling symlink. */
|
||||
|
||||
Reference in New Issue
Block a user