diff options
author | Joseph Sutton <josephsutton@catalyst.net.nz> | 2022-10-22 10:11:53 +1300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2022-11-02 04:23:34 +0000 |
commit | 074e92849715ed3485703cfbba3771d405e4e78a (patch) | |
tree | c7cabefefa32f0524cd0721df10be0766595ed5e /third_party/heimdal/lib/base/heimbase-svc.h | |
parent | 6353f9e9c47d02dc0e18585bfaad48b2ce85441d (diff) | |
download | samba-074e92849715ed3485703cfbba3771d405e4e78a.tar.gz |
third_party/heimdal: 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.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15110
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'third_party/heimdal/lib/base/heimbase-svc.h')
-rw-r--r-- | third_party/heimdal/lib/base/heimbase-svc.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/third_party/heimdal/lib/base/heimbase-svc.h b/third_party/heimdal/lib/base/heimbase-svc.h index 083917fb806..0e7454c8382 100644 --- a/third_party/heimdal/lib/base/heimbase-svc.h +++ b/third_party/heimdal/lib/base/heimbase-svc.h @@ -75,4 +75,9 @@ heim_dict_t attributes; \ int32_t error_code +#define HEIM_PLUGIN_FTABLE_COMMON_ELEMENTS(CONTEXT_TYPE) \ + int minor_version; \ + int (HEIM_LIB_CALL *init)(CONTEXT_TYPE, void **); \ + void (HEIM_LIB_CALL *fini)(void *) + #endif /* HEIMBASE_SVC_H */ |