[SSSD] Make return codes of basic sysdb operations consistent

Pavel Reichl preichl at redhat.com
Tue Apr 22 09:31:31 UTC 2014


Hello,

I recently started working on ticket #1991.
https://fedorahosted.org/sssd/ticket/1991

"The return codes of various sysdb operations differ. Some search
operations would return ENOENT if they don't find a matching object some
would return EOK but an empty result list."

I think that the core of the problem is the expectation that ldb_search
returns LDB_ERR_NO_SUCH_OBJECT in case no results were found. But it
instead returns LDB_SUCCESS and sets result->count to 0.

I think it would be best for sysdb functions in case that no results
were found to return both ENOENT value and 'properly' empty list. 

Thanks for opinions.

Pavel Reichl




More information about the sssd-devel mailing list