Introduce macro for common plugin structure elements
Heimdal's HDB plugin interface, and hence Samba's KDC that depends upon it, doesn't work on 32-bit builds due to structure fields being arranged in the wrong order. This problem presents itself in the form of segmentation faults on 32-bit systems, but goes unnoticed on 64-bit builds thanks to extra structure padding absorbing the errant fields. This commit reorders the HDB plugin structure fields to prevent crashes and introduces a common macro to ensure every plugin presents a consistent interface. Samba BUG: https://bugzilla.samba.org/show_bug.cgi?id=15110 Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
This commit is contained in:

committed by
Nico Williams

parent
16179383fb
commit
cfb32a638e
@@ -653,7 +653,7 @@ reduce_by_version(heim_object_t value, void *ctx, int *stop)
|
||||
struct iter_ctx *s = ctx;
|
||||
struct heim_plugin *pl = value;
|
||||
|
||||
if (pl->ftable && pl->ftable->version >= s->caller->min_version)
|
||||
if (pl->ftable && pl->ftable->minor_version >= s->caller->min_version)
|
||||
heim_array_append_value(s->result, pl);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user