-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 07/28/2010 09:29 PM, Stephen Gallagher wrote:
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.
Just one comment:
+ if (!_list1) {
+ list1 = talloc_array(tmp_ctx, char *, 1);
+ if (!list1) {
+ talloc_free(tmp_ctx);
+ return ENOMEM;
+ }
+ list1[0] = NULL;
+ }
+ else {
+ list1 = _list1;
+ }
Since we are duplicating the arrays later on with talloc_strdup, I think
it would be OK to just have something along the lines:
char *sentinel[] = { NULL };
list1 = _list1 ? _list1 : sentinel;
Patch 0003: Add sysdb_group_dn_reverse()
This is a simple utility to just return the rdn name portion of a
distinguished name.
Ack to the code, but why is the function called sysdb_group_dn_reverse?
Patch 0004: Add a utility routine to duplicate a NULL-terminated list
of
strings.
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
Ack, looks OK, perhaps it would be nice to have a unit test
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.
The last parameter of sdap_initgr_rfc2307_send now looks redundant.
Maybe it would be nice to move the allocation of attributes one level up
and pass it via the grp_attrs param?
Nitpick:
+ }
+
+ else {
The extra blank like here looks confusing.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Fedora -
http://enigmail.mozdev.org/
iEYEARECAAYFAkxRZtoACgkQHsardTLnvCUiVACeOtXtJ13C2IZa6k8WqUnnuiVG
Bu4An0mcgI9sbNQVuUgFh0ViN1mw8FqF
=qLwO
-----END PGP SIGNATURE-----