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

On 07/29/2010 04:25 PM, Stephen Gallagher wrote:
> New versions of the patch attached. Changes described below:
> 
> On 07/28/2010 03:29 PM, Stephen Gallagher wrote:
>> Patch 0001: Add sysdb_attrs_to_list() utility function
>> This is a simple utility to grab the values of a particular attributes
>> from a sysdb_attrs list.
> 
> Added additional comments to describe the process.
> Fixed a potential memory-corruption bug (I forgot a break, so it was
> possible for the function to attempt to store more data than allocated).
> Added a talloc_realloc() to the end of the function so as not to waste
> any memory we didn't end up needing.
> Updated the unit test to prove that this was safe.
> 

+    attrs_list[1] = sysdb_new_attrs(test_ctx);
+    sysdb_attrs_add_string(attrs_list[1], "test_attr", "attr2");
+    attrs_list[2] = sysdb_new_attrs(test_ctx);
+    sysdb_attrs_add_string(attrs_list[1], "nottest_attr", "attr3");

I think the second sysdb_attrs_add_string() was supposed to say
'attr_list[2]'?

Otherwise looks fine.

>> Patch 0003: Add sysdb_group_dn_reverse()
>> This is a simple utility to just return the rdn name portion of a
>> distinguished name.
> 
> 
> Changed the function name to sysdb_group_dn_name()

Ack

>> Patch 0005: Add sysdb_update_members function
>> This function will take a user, a list of groups that this user
>> should be added to and a list of groups the user should be removed
>> from and will recursively call sysdb_[add|remove]_group_member
> 
> 
> Added a unit test as requested. This unit test revealed a potential
> memory-corruption bug, as well as incorrect handling of NULL values for
> the input lists, so I fixed those as well.
> 
> Further proof that we need to be writing more unit tests...
> 

Ack, the new code reads better.

>> Patch 0006: Clean up initgroups processing for RFC2307
>> Instead of recursively updating all users of each group the user
>> being queried belongs to, just add or remove membership for the
>> requested user.
> 
> Fixed style issues with if(
> Used SYSDB_MEMBEROF when doing sysdb lookups where appropriate.
> Removed grp_attrs input value from sdap_initgr_rfc2307_send() as it is
> no longer used.
> 
> 

Visual ack, although I still need to test it..
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkxRu8UACgkQHsardTLnvCWR0wCeKWz2t/KjvX9IlMEWIoh67aUs
SF8AnAlW8S5avuGamX3pXHkwF0YEv+b4
=QNb5
-----END PGP SIGNATURE-----
_______________________________________________
sssd-devel mailing list
sssd-devel@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/sssd-devel

Reply via email to