[SSSD] Behaviour of getgrnam/getgrgid

Ralf Haferkamp rhafer at suse.de
Mon Sep 20 15:13:46 UTC 2010


On Friday 17 September 2010 19:56:15 Stephen Gallagher wrote:
> On 09/17/2010 12:16 PM, Ralf Haferkamp wrote:
> > Find a new version attached. Does that look better? If that is not
> > what you were referring to lets discuss it in IRC on monday.
> > 
> > Note, I needed to implement sdap_process_group_send() slightly
> > differnent than the other _send functions in sdap_async_accounts().
> > Instead of returning as tevent_req* it does return a error code.
> > The tevent_req* is returned via the argument list.  I did this
> > because there are cases where sdap_process_group_send() does not
> > need to create a new tevent_req*, e.g. when the groups doesn't have
> > any members or when all groupmembers are already cached.
> 
> In situations like this, the correct behavior is still to return the
> request, but inside the _send() function call:
> 
> tevent_req_done(req);
> tevent_req_post(req, ev);
> return req;
> 
> This way it will just call the finish handler immediately after the
> parent function returns. Then you don't need to have separate
> codepaths for functions that do or do not have to make subrequests.
Nice, that makes the code a little cleaner, thanks. New patches attached.
 
-- 
Ralf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Shortcut-for-save_group-to-accept-sysdb-DNs-as-membe.patch
Type: text/x-patch
Size: 3726 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20100920/8ce32f07/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Return-all-group-members-from-getgr-nam-gid.patch
Type: text/x-patch
Size: 15810 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20100920/8ce32f07/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-New-config-option-to-disable-group-unrolling.patch
Type: text/x-patch
Size: 2580 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20100920/8ce32f07/attachment-0002.bin>


More information about the sssd-devel mailing list