URL: https://github.com/SSSD/sssd/pull/520
Author: sumit-bose
 Title: #520: DESKPROFILE: Fix 'Improper use of negative value'
Action: opened

PR body:
"""
This issue was found by Coverity. Similar as in code block before ret
must be set to errno to allow proper log messages since initial ret will
always be -1.
"""

To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/520/head:pr520
git checkout pr520
From e035417b0aac8bfef8361d01c26f328d53cb2da3 Mon Sep 17 00:00:00 2001
From: Sumit Bose <sb...@redhat.com>
Date: Mon, 19 Feb 2018 17:56:32 +0100
Subject: [PATCH] DESKPROFILE: Fix 'Improper use of negative value'

This issue was found by Coverity. Similar as in code block before ret
must be set to errno to allow proper log messages since initial ret will
always be -1.
---
 src/providers/ipa/ipa_deskprofile_rules_util.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/providers/ipa/ipa_deskprofile_rules_util.c b/src/providers/ipa/ipa_deskprofile_rules_util.c
index e52587378..8f4d4c90c 100644
--- a/src/providers/ipa/ipa_deskprofile_rules_util.c
+++ b/src/providers/ipa/ipa_deskprofile_rules_util.c
@@ -1065,6 +1065,7 @@ ipa_deskprofile_rules_remove_user_dir(const char *user_dir,
     if (getegid() != orig_gid) {
         ret = setegid(orig_gid);
         if (ret == -1) {
+            ret = errno;
             DEBUG(SSSDBG_CRIT_FAILURE,
                   "Unable to set effective user id (%"PRIu32") of the "
                   "domain's process [%d]: %s\n",
_______________________________________________
sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org
To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org

Reply via email to