提交 3f3d2f9d 编写于 作者: D Daniel P. Berrange

Check against python None type when filling in auth parameters

When deciding whether to provide an auth function callback
in openAuth(), credcb was checked against NULL, when it
really needs to be checked against Py_None
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
上级 01573bdf
......@@ -1840,7 +1840,8 @@ libvirt_virConnectOpenAuth(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
auth.credtype[i] = (int)PyLong_AsLong(val);
}
}
auth.cb = pycredcb ? virConnectCredCallbackWrapper : NULL;
if (pycredcb && pycredcb != Py_None)
auth.cb = virConnectCredCallbackWrapper;
auth.cbdata = pyauth;
LIBVIRT_BEGIN_ALLOW_THREADS;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册