mirror of
https://github.com/samba-team/samba.git
synced 2025-08-02 00:22:11 +03:00
auth pycredentials: incorrect PyArg_ParseTupleAndKeywords call
The challenge parameter was being treated as a string rather than as a data blob. This was causing intermittent seg faults. Removed the server_timestamp parameter as it's not currently used. Unable to produce a test case to reliably replicate the failure. However auth_log_samlogon does flap Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
committed by
Andrew Bartlett
parent
ee0eb1daa3
commit
610919e5e6
@ -90,16 +90,19 @@ static PyObject *py_creds_get_ntlm_response(PyObject *self, PyObject *args, PyOb
|
||||
DATA_BLOB lm_session_key = data_blob_null;
|
||||
DATA_BLOB nt_session_key = data_blob_null;
|
||||
const char *kwnames[] = { "flags", "challenge",
|
||||
"target_info", "server_timestamp",
|
||||
"target_info",
|
||||
NULL };
|
||||
|
||||
tv_now = timeval_current();
|
||||
server_timestamp = timeval_to_nttime(&tv_now);
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"i" PYARG_BYTES_LEN "|" PYARG_BYTES_LEN "K",
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "is#|s#",
|
||||
discard_const_p(char *, kwnames),
|
||||
&flags, &challenge, &target_info.data, &target_info.length)) {
|
||||
&flags,
|
||||
&challenge.data,
|
||||
&challenge.length,
|
||||
&target_info.data,
|
||||
&target_info.length)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -34,3 +34,4 @@
|
||||
^samba3.blackbox.smbclient_tar.* # fails very, very often on sn-devel
|
||||
^samba3.blackbox.smbclient_s3.*.sending a message to the remote server # flakey on sn-devel-104 and sn-devel-144
|
||||
^samba3.blackbox.smbclient_s3.*.creating a good symlink and deleting it by path # flakey on sn-devel-104 and sn-devel-144
|
||||
^samba.tests.auth_log_samlogon
|
||||
|
@ -330,5 +330,3 @@
|
||||
# We currently don't send referrals for LDAP modify of non-replicated attrs
|
||||
^samba4.ldap.rodc.python\(rodc\).__main__.RodcTests.test_modify_nonreplicated.*
|
||||
^samba4.ldap.rodc_rwdc.python.*.__main__.RodcRwdcTests.test_change_password_reveal_on_demand_kerberos
|
||||
# samba.tests.auth_log_samlogon should fail until all the fixes are applied
|
||||
^samba.tests.auth_log_samlogon
|
||||
|
Reference in New Issue
Block a user