]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
auth:creds: Fix parameter in creds.set_named_ccache()
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Tue, 27 Apr 2021 22:55:13 +0000 (10:55 +1200)
committerJeremy Allison <jra@samba.org>
Wed, 19 May 2021 01:32:34 +0000 (01:32 +0000)
Use the passed-in value for 'obtained' rather than always using
CRED_SPECIFIED.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
auth/credentials/pycredentials.c

index 10190926c8318fcfb96e3c7215f7437a4b76c7d8..566405a08ee96f70f919b7faf485c2ba33017fae 100644 (file)
@@ -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) {