URL: https://github.com/SSSD/sssd/pull/241 Title: #241: FleetCommander Integration
jhrozek commented: """ There are still some Coverity warnings: ``` Error: NEGATIVE_RETURNS (CWE-394): sssd-1.15.4/src/providers/ipa/ipa_deskprofile_rules_util.c:232: negative_return_fn: Function "sss_create_dir("/var/lib/sss/deskprofile", domain, 493U, getuid(), getgid())" returns a negative number. sssd-1.15.4/src/util/files.c:843:5: var_tested_neg: Variable "ret" is negative. sssd-1.15.4/src/util/files.c:878:5: return_negative_variable: Explicitly returning negative variable "ret". sssd-1.15.4/src/providers/ipa/ipa_deskprofile_rules_util.c:232: var_assign: Assigning: signed variable "ret" = "sss_create_dir". sssd-1.15.4/src/providers/ipa/ipa_deskprofile_rules_util.c:235: negative_returns: "ret" is passed to a parameter that cannot be negative. sssd-1.15.4/src/util/util_errors.c:128:5: neg_sink_parm_call: Passing "error" to "strerror", which cannot accept a negative number. # 233| getuid(), getgid()); # 234| if (ret != EOK) { # 235|-> DEBUG(SSSDBG_TRACE_FUNC, # 236| "Failed to create the directory "%s/%s" that would be used to " # 237| "store the Desktop Profile rules users' directory [%d]: %s\n",
Error: NEGATIVE_RETURNS (CWE-394): sssd-1.15.4/src/providers/ipa/ipa_deskprofile_rules_util.c:250: negative_return_fn: Function "sss_create_dir(domain_dir, shortname, 384U, uid, gid)" returns a negative number. sssd-1.15.4/src/util/files.c:843:5: var_tested_neg: Variable "ret" is negative. sssd-1.15.4/src/util/files.c:878:5: return_negative_variable: Explicitly returning negative variable "ret". sssd-1.15.4/src/providers/ipa/ipa_deskprofile_rules_util.c:250: var_assign: Assigning: signed variable "ret" = "sss_create_dir". sssd-1.15.4/src/providers/ipa/ipa_deskprofile_rules_util.c:252: negative_returns: "ret" is passed to a parameter that cannot be negative. sssd-1.15.4/src/util/util_errors.c:128:5: neg_sink_parm_call: Passing "error" to "strerror", which cannot accept a negative number. # 250| ret = sss_create_dir(domain_dir, shortname, 0600, uid, gid); # 251| if (ret != EOK) { # 252|-> DEBUG(SSSDBG_TRACE_FUNC, # 253| "Failed to create the directory "%s/%s/%s" that would be used " # 254| "to store the Desktop Profile rules for the user "%s" [%d]: " ``` """
See the full comment at https://github.com/SSSD/sssd/pull/241#issuecomment-322232061