Kaydet (Commit) 82a79ea4 authored tarafından Bahadır Kandemir's avatar Bahadır Kandemir

Fix timeout segfault problem

üst 9ef8cbc3
......@@ -26,6 +26,7 @@
#include "log.h"
#include "bus.h"
#include "script.h"
#include "policy.h"
//! Check if sender is allowed to call method
......@@ -83,6 +84,13 @@ policy_check(const char *sender, const char *action, int *result)
PyObject *ret = bus_execute2(conn, "org.freedesktop.PolicyKit1", "/org/freedesktop/PolicyKit1/Authority", "org.freedesktop.PolicyKit1.Authority", "CheckAuthorization", obj, -1, "(sa{sv})sa{ss}us");
if (!ret) {
char *eStr, *vStr;
py_catch(&eStr, &vStr, 1);
*result = POLICY_NO;
return 0;
}
if (PyTuple_GetItem(ret, 0) == Py_True) {
*result = POLICY_YES;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment