mirror of
https://github.com/samba-team/samba.git
synced 2025-01-22 22:04:08 +03:00
eb480df1ba
This function is only used by Python.pm, and was assuming any argument unrecognised by hasType is a name. It sometimes isn't, resulting in structures like this: { 'DATA' => { 'TYPE' => 'STRUCT' }, 'NAME' => { 'TYPE' => 'STRUCT', 'ALIGN' => undef, 'SURROUNDING_ELEMENT' => undef, 'ORIGINAL' => { 'TYPE' => 'STRUCT', 'FILE' => 'source3/librpc/idl/smbXsrv.idl', 'LINE' => 101, 'NAME' => 'tevent_context' }, 'ELEMENTS' => undef, 'NAME' => 'tevent_context', 'PROPERTIES' => undef }, 'TYPE' => 'TYPEDEF' }; The problem with that is we end up with the HASH reference as a name in Python bindings, like this PyErr_SetString(PyExc_TypeError, "Can not convert C Type struct HASH(0x5e2dfe5ee278) from Python"); which makes the build nondeterministic (as well as making the message a little mysterious). I think all the structures for which this happens are marked '[ignore]' in IDL, meaning they are not transmitted on the wire. They should perhaps also not have useless Python getsetters, but let's call that a different problem. Thanks to Freexian and the Debian LTS project for sponsoring this work. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13213 Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit f3433f60b8ee83fc785a6e6838513de31bff5a6a)