[SSSD] [PATCH] Fix two netgroup issues

Stephen Gallagher sgallagh at redhat.com
Thu Mar 8 19:26:05 UTC 2012


On Thu, 2012-03-08 at 14:15 -0500, Stephen Gallagher wrote:
> On Wed, 2012-03-07 at 20:47 +0100, Jakub Hrozek wrote:
> > Hi,
> > 
> > Amith reported these two issues.
> > 
> > [PATCH 1/2] Save original name into the in-memory cache
> > We were saving the original name into the netgroup hash when the object
> > was first constructed but when no domain matched, we would save the cased
> > name. The first request that was constructed with the original name was never
> > marked as "ready", so another request with the same name was stuck waiting.
> > 
> 
> Ack.
> 
> I was thinking about it for a while, and there's one slight performance
> issue here. Lookups in a case-insensitive domain might go to the sysdb
> more often than strictly necessary. The reason being that if I request
> "netgroup1" and then "NetGroup1", the second one will not match the hash
> table and it will go back to the sysdb.
> 
> That said, this is definitely an edge-case (and it will still be a local
> lookup, not a provider check), so the only real downside here is extra
> wasted memory as we will be keeping two copies of the netgroup info in
> the hash table. Probably not a sufficiently-large waste to try
> optimizing right now though, so this patch is fine as-is.
> 
> > [PATCH 2/2]
> > setnetgrent return codes are handled in the _done callback, some of them
> > gracefully, such as ENOENT that sends an empty reply. This patch uses
> > tevent_req_post() to always call the callback and handle error conditions
> > there. In particular, Amith was able to trigger this error by requesting
> > a netgroup by raw name when all domains were marked as FQDN only
> 
> Ack

Pushed both to master and sssd-1-8.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120308/771880c8/attachment.sig>


More information about the sssd-devel mailing list