summaryrefslogtreecommitdiff
path: root/source4/auth
diff options
context:
space:
mode:
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>2019-07-07 17:23:23 +1200
committerAndrew Bartlett <abartlet@samba.org>2019-07-22 22:20:26 +0000
commit57fc8b6c5369d99b544ff0f43720b9670e018a2a (patch)
tree3cddd4b264b1f18b454ba74253b077bfeda87e84 /source4/auth
parenta5e8a5e05bcb89a3fc36044ce89ac49df2f00d03 (diff)
downloadsamba-57fc8b6c5369d99b544ff0f43720b9670e018a2a.tar.gz
s4/auth/pygensec: don't segfault when reporting bad types
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/auth')
-rw-r--r--source4/auth/gensec/pygensec.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source4/auth/gensec/pygensec.c b/source4/auth/gensec/pygensec.c
index b2c1e9c279a..11a1c7bca31 100644
--- a/source4/auth/gensec/pygensec.c
+++ b/source4/auth/gensec/pygensec.c
@@ -281,9 +281,10 @@ static PyObject *py_gensec_set_credentials(PyObject *self, PyObject *args)
creds = PyCredentials_AsCliCredentials(py_creds);
if (!creds) {
- PyErr_Format(PyExc_TypeError,
- "Expected samba.credentaials for credentials argument got %s",
- talloc_get_name(pytalloc_get_ptr(py_creds)));
+ PyErr_Format(
+ PyExc_TypeError,
+ "Expected samba.credentials for credentials argument, "
+ "got %s", pytalloc_get_name(py_creds));
return NULL;
}