From: Joseph Sutton Date: Tue, 27 Apr 2021 22:55:13 +0000 (+1200) Subject: auth:creds: Fix parameter in creds.set_named_ccache() X-Git-Tag: tevent-0.11.0~821 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2d05268aa0904221c452fc650fcdfb680efc20bb;p=thirdparty%2Fsamba.git auth:creds: Fix parameter in creds.set_named_ccache() Use the passed-in value for 'obtained' rather than always using CRED_SPECIFIED. Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett Reviewed-by: Douglas Bagnall --- diff --git a/auth/credentials/pycredentials.c b/auth/credentials/pycredentials.c index 10190926c83..566405a08ee 100644 --- a/auth/credentials/pycredentials.c +++ b/auth/credentials/pycredentials.c @@ -798,6 +798,7 @@ static PyObject *py_creds_set_named_ccache(PyObject *self, PyObject *args) if (!PyArg_ParseTuple(args, "s|iO", &newval, &_obt, &py_lp_ctx)) return NULL; + obt = _obt; mem_ctx = talloc_new(NULL); if (mem_ctx == NULL) { @@ -813,7 +814,7 @@ static PyObject *py_creds_set_named_ccache(PyObject *self, PyObject *args) ret = cli_credentials_set_ccache(creds, lp_ctx, - newval, CRED_SPECIFIED, + newval, obt, &error_string); if (ret != 0) {