-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
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.
Patch 0002: Add a utility function to compare two non-ordered lists of
strings. It stores the first list as keys in a dhash table, then
attempts to remove all the keys in the second list with dhash_remove().
If the return value is success, that value was in both, if it's not
found, then it was only in the second list. The leftover keys at the end
are returned as the values only in the first list.
No changes
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()
Patch 0004: Add a utility routine to duplicate a NULL-terminated list
of
strings.
No changes
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...
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.
_______________________________________________
sssd-devel mailing list
sssd-devel(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/sssd-devel
- --
Stephen Gallagher
RHCE 804006346421761
Delivering value year after year.
Red Hat ranks #1 in value among software vendors.
http://www.redhat.com/promo/vendor/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Fedora -
http://enigmail.mozdev.org/
iEYEARECAAYFAkxRj1cACgkQeiVVYja6o6M0DwCeO6Iw7hipds2/KJepTQ/jMzYI
QK8AoIo1vluVbRQ6UfEvC5EH+tw7dnrQ
=b1JV
-----END PGP SIGNATURE-----