[PATCHES] SDAP: Refactor sdap_nested_group_hash_group
by Pavel Reichl
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!
9 years