1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00
samba-mirror/source4/libcli
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 c81aff362f 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
..
composite s4-libcli: Remove unused header from composite/composite.c 2019-11-10 22:27:47 +00:00
dgram s4:libcli: Covscan: unchecked return value for file_save() 2022-05-14 03:49:32 +00:00
ldap util/charset: Rename utf16_len_n() to utf16_null_terminated_len_n() 2023-11-15 22:07:36 +00:00
rap s4-libcli/rap: Set the switch_value before NDR_BUFFERS to prepare for new libndr behaviour 2019-12-12 02:30:40 +00:00
raw util/charset: Rename utf16_len_n() to utf16_null_terminated_len_n() 2023-11-15 22:07:36 +00:00
resolve s4:libcli: Fix code spelling 2023-08-14 21:45:29 +00:00
smb2 s4:libcli: Call correct function to get HMAC output length 2023-11-30 00:02:33 +00:00
smb_composite s4:libcli: Fix code spelling 2023-08-14 21:45:29 +00:00
util s4:libcli: Fix conversion from HRESULT and WERROR to Python objects 2023-12-21 20:21:34 +00:00
wbclient
wrepl libcli/util: add struct tstream_context to tstream_read_pdu_blob_full_fn_t 2023-10-25 22:23:38 +00:00
cliconnect.c
clideltree.c s4: libcli: In smbcli_deltree() use smbcli_unlink_wcard() in place of smbcli_unlink(). 2021-12-09 18:06:35 +00:00
clifile.c s4: libcli: smbcli_unlink() is no longer used with wildcard patterns. 2021-12-09 18:06:35 +00:00
clilist.c util: Drop unused variable num_received 2022-02-17 18:12:51 +00:00
climessage.c
clireadwrite.c source4/libcli/clireadwrite.c: typo fixes 2019-10-31 00:43:37 +00:00
clitrans2.c
finddc.h
finddcs_cldap.c
libcli.h s4: libcli: Add smbcli_unlink_wcard(). 2021-12-09 18:06:35 +00:00
wscript_build build: Remove unused dependencies 2022-11-08 02:39:37 +00:00