[SSSD] [PATCH] Return all user members for RFC2307 groups (sssd-1.2)

Jakub Hrozek jhrozek at redhat.com
Fri Oct 8 19:45:04 UTC 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10/08/2010 04:57 PM, Stephen Gallagher wrote:
> On 10/08/2010 05:09 AM, Jakub Hrozek wrote:
>>>>> [PATCH 1/3] sysdb interface for adding expired user entries
>>>>> These are added instead of looking up the members.
> 
> Ack.
> 
>>>>> [PATCH 2/3] Shortcut for save_group() to accept sysdb DNs as member
>>>>> attributes
> 
> Nack. I would rather we use an enum here instead of adding extra
> booleans to the interface. Otherwise it's fine. (I would have made the
> same comment to Ralf had I been the one to review this code)
> 

OK..I hope I got the combinations right, esp. for RFC2307bis, it seemed
like store_members was never used in that case..

>>>>> [PATCH 3/3] Add fake users during saving of RFC2307 group
>>>>> Instead of looking up the user entries, we just add dummy expired
>>>>> users that are refreshed when they are requested with
>>>>> getpwnam/getpwuid
> 
> Nack.
> 
> sdap_process_group_send(): Please allocate attrs, filter and
> grp_state->sysdb_dns atop grp_state and grp_state->sysdb_dns->values
> atop grp_state->sysdb_dns. Allocating them on memctx means that they
> will not go away until the parent memory context does. These values are
> only needed for the lifetime of this request. If the parent memory
> context lives a long time, this is basically a memory leak.
> 
> Otherwise, I'm fine with this patch.
> 

OK but grp_state->sysdb_dns and grp_state->sysdb_dns->values are a
little tricky. The thing is that they directly reference the "member:"
sysdb attribute of the group being processed, so I think they should be
allocated on the same context the group to allow for a safe saving of
the group.

The cleanest solution would be to talloc_steal them on _recv, but we
process all the groups at the some time so distinguishing between them
in sdap_get_groups_processed() would not be trivial, I think. So I
talloc_steal them onto the group in case the request is
sdap_process_group_done()..hope this is OK.

We might want to keep both these issues in mind as both were copied from
Ralf's patches that are under review for master.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkyvdLEACgkQHsardTLnvCViowCgysm1/bO+ijWUu8g4DRvf+iTl
oCgAniMeITcvVlsxPboKuZPj3TkxLG8v
=rzpE
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-sysdb-interface-for-adding-expired-user-entries.patch
Type: text/x-patch
Size: 9632 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20101008/cde82a5e/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Shortcut-for-save_group-to-accept-sysdb-DNs-as-membe.patch
Type: text/x-patch
Size: 6791 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20101008/cde82a5e/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Add-fake-users-during-saving-of-RFC2307-group.patch
Type: text/x-patch
Size: 22914 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20101008/cde82a5e/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-sysdb-interface-for-adding-expired-user-entries.patch.sig
Type: application/pgp-signature
Size: 72 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20101008/cde82a5e/attachment.sig>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Shortcut-for-save_group-to-accept-sysdb-DNs-as-membe.patch.sig
Type: application/pgp-signature
Size: 72 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20101008/cde82a5e/attachment-0001.sig>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Add-fake-users-during-saving-of-RFC2307-group.patch.sig
Type: application/pgp-signature
Size: 72 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20101008/cde82a5e/attachment-0002.sig>


More information about the sssd-devel mailing list