[SSSD] [PATCH] LDAP: Initialize user count for AD matching rule
Jakub Hrozek
jhrozek at redhat.com
Mon Nov 18 16:05:43 UTC 2013
On Mon, Nov 18, 2013 at 04:59:09PM +0100, Sumit Bose wrote:
> On Mon, Nov 18, 2013 at 04:44:46PM +0100, Jakub Hrozek wrote:
> > A RHEL customer was hitting this issue. To reproduce, just enable the
> > matching rule and request an empty group.
>
> ACK.
>
> But I think the main problem is that we are a bit inconsistent handling
> ENOENT and the return values. If haven't checked the whole code but
> there are different scenarios is no entries are found:
>
> - return ENOENT and do not set the return values to anything (this is
> what happened here)
> - return ENOENT and set the count to 0 and maybe the data to NULL as
> well.
> - return EOK and set the count to 0 and data to NULL.
>
> I think we should agree on one scheme to avoid such issues in future.
> The sysdb refactoring might be to good place to check if the sysdb
> inferface is consistent here.
>
> bye,
> Sumit
Yes, I think we even have a ticket planned for 1.12 where the
refactoring happens:
https://fedorahosted.org/sssd/ticket/1991
Changing the sysdb would be a good step. But then also some requests
will quit with ENOENT and in _recv return just the error code. I added a
note to #1991 to check explicit usage of tevent_req_error(req, ENOENT)
More information about the sssd-devel
mailing list