diff options
author | Sumit Bose <sbose@redhat.com> | 2013-06-18 15:42:02 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-06-19 20:16:48 +0200 |
commit | 2f55d9738d66fa52c2d4332842b35e4174e45653 (patch) | |
tree | f2a225786c662676a05b4f0d1f3db7c079e68d1f /src | |
parent | fc0d76ac54c813c78380ab388f69c69c3620155d (diff) | |
download | sssd-2f55d9738d66fa52c2d4332842b35e4174e45653.tar.gz sssd-2f55d9738d66fa52c2d4332842b35e4174e45653.tar.bz2 sssd-2f55d9738d66fa52c2d4332842b35e4174e45653.zip |
PAC: do not expect that sysdb_search_object_by_sid() return ENOENT
sysdb_search_object_by_sid() does not return ENOENT if no related object
was found in the cache but EOK and an empty result list.
Fixes https://fedorahosted.org/sssd/ticket/1989
Diffstat (limited to 'src')
-rw-r--r-- | src/responder/pac/pacsrv_cmd.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/responder/pac/pacsrv_cmd.c b/src/responder/pac/pacsrv_cmd.c index 3edf0356..479a0941 100644 --- a/src/responder/pac/pacsrv_cmd.c +++ b/src/responder/pac/pacsrv_cmd.c @@ -288,16 +288,16 @@ static void pac_lookup_sids_done(struct tevent_req *req) ret = sysdb_search_object_by_sid(pr_ctx, dom->sysdb, dom, entries[c].key.str, NULL, &msg); if (ret != EOK) { - if (ret == ENOENT) { - DEBUG(SSSDBG_OP_FAILURE, ("No entry found for SID [%s].\n", - entries[c].key.str)); - } else { - DEBUG(SSSDBG_OP_FAILURE, ("sysdb_search_object_by_sid " \ - "failed.\n")); - } + DEBUG(SSSDBG_OP_FAILURE, ("sysdb_search_object_by_sid " \ + "failed.\n")); continue; } - if (msg->count > 1) { + + if (msg->count == 0) { + DEBUG(SSSDBG_OP_FAILURE, ("No entry found for SID [%s].\n", + entries[c].key.str)); + continue; + } else if (msg->count > 1) { DEBUG(SSSDBG_CRIT_FAILURE, ("More then one result returned " \ "for SID [%s].\n", entries[c].key.str)); |