[SSSD] [PATCHES] SDAP: Refactor sdap_nested_group_hash_group
Pavel Reichl
preichl at redhat.com
Mon Nov 3 11:20:12 UTC 2014
Hello,
please see attached patches.
1st patch adds unit test for sdap_nested_group_hash_group()
2nd patch refactors sdap_nested_group_hash_group()
While working on the test I found what I think may be a bug in
sdap_nested_group_hash_group()
Part of function definition consists of following:
int32_t ad_group_type;
...
ret = sysdb_attrs_get_int32_t(group, SYSDB_GROUP_TYPE, &ad_group_type)
ad_group_type is bitmask for AD group types and may contain
2147483648 (0x80000000)
(http://msdn.microsoft.com/en-us/library/ms675935%28v=vs.85%29.aspx)
which can't be stored in 32 bit integer.
In second patch I changed type of ad_group_type to uint32_t. But without
this change tests will fail because sysdb_attrs_get_int32_t() will
return ERANGE.
Thanks!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-TESTS-unit-tests-for-sdap_nested_group_hash_group.patch
Type: text/x-patch
Size: 18910 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20141103/6d35666d/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-SDAP-Refactor-sdap_nested_group_hash_group.patch
Type: text/x-patch
Size: 6924 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20141103/6d35666d/attachment-0001.bin>
More information about the sssd-devel
mailing list