From: Daniel P. Berrange Date: Mon, 10 Sep 2012 15:44:40 +0000 (+0100) Subject: Print any exception that occurs in authentication callback X-Git-Tag: CVE-2012-4423~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=01573bdf4f462a0a7e7a29a37ddfcc7ecff3c049;p=thirdparty%2Flibvirt.git Print any exception that occurs in authentication callback If an exception occurs in the python callback for openAuth() the stack trace isn't seen by the apps, since this code is called from libvirt context. To aid diagnostics, print the error to stderr at least Signed-off-by: Daniel P. Berrange --- diff --git a/python/libvirt-override.c b/python/libvirt-override.c index c51dd3fac9..768144a009 100644 --- a/python/libvirt-override.c +++ b/python/libvirt-override.c @@ -1776,8 +1776,10 @@ static int virConnectCredCallbackWrapper(virConnectCredentialPtr cred, PyErr_Clear(); pyret = PyEval_CallObject(pycb, list); - if (PyErr_Occurred()) + if (PyErr_Occurred()) { + PyErr_Print(); goto cleanup; + } ret = PyLong_AsLong(pyret); if (ret == 0) {