1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-21 18:04:06 +03:00
Joseph Sutton f86d65117b s4:libcli: Fix conversion from HRESULT and WERROR to Python objects
The inner values of HRESULT and WERROR are 32‐bit unsigned integers,
which might not be representable in type ‘int’. We must then use the ‘k’
format specifier, which corresponds to ‘unsigned long’, a type
guaranteed to be at least 32 bits in size.

Commit c81aff362fe99a65385c6f8337ffcb47c9456829 fixed
PyErr_FromNTSTATUS(), but it did not attempt to fix the other cases.

PyErr_FromHRESULT() might return a tuple like this:
(-2147024809, 'One or more arguments are invalid.')

which, after this commit, will become this:
(2147942487, 'One or more arguments are invalid.')

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-21 20:21:34 +00:00
..
2023-09-11 02:42:41 +00:00
2018-04-24 01:53:19 +02:00
2023-11-20 15:37:33 +00:00
2023-12-08 02:28:33 +00:00
2023-12-08 02:28:33 +00:00
2023-11-20 15:37:33 +00:00
2023-12-11 01:08:37 +00:00
2023-11-20 15:37:33 +00:00
2023-11-21 17:34:36 +00:00
2011-10-27 17:09:50 +02:00