[SSSD] [PATCH] LDAP: Initialize user count for AD matching rule

Sumit Bose sbose at redhat.com
Mon Nov 18 15:59:09 UTC 2013


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



More information about the sssd-devel mailing list