Commit 610919e5 authored by Gary Lockyer's avatar Gary Lockyer Committed by Andrew Bartlett

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: default avatarGary Lockyer <gary@catalyst.net.nz>
Reviewed-by: default avatarGarming Sam <garming@catalyst.net.nz>
Reviewed-by: default avatarAndrew Bartlett <abartlet@samba.org>
parent ee0eb1da
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment