summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJiri Moskovcak <jmoskovc@redhat.com>2009-09-16 16:22:39 +0200
committerJiri Moskovcak <jmoskovc@redhat.com>2009-09-16 16:22:39 +0200
commit84e7d725639764752088976914bfdc40fce8f3d0 (patch)
tree7952b0faf2ba87d660e85178f812c22ada3654eb /lib
parent7094404c0d461b5545d88ef3c66ce4d6cabdcdcd (diff)
downloadabrt-84e7d725639764752088976914bfdc40fce8f3d0.tar.gz
abrt-84e7d725639764752088976914bfdc40fce8f3d0.tar.xz
abrt-84e7d725639764752088976914bfdc40fce8f3d0.zip
moved g_type_init() to right place
Diffstat (limited to 'lib')
-rw-r--r--lib/Utils/Polkit.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Utils/Polkit.cpp b/lib/Utils/Polkit.cpp
index d3d92d14..6d6cf0dd 100644
--- a/lib/Utils/Polkit.cpp
+++ b/lib/Utils/Polkit.cpp
@@ -32,7 +32,6 @@ static PolkitResult do_check(PolkitSubject *subject, const char *action_id)
PolkitAuthorizationResult *result;
GError *error = NULL;
- g_type_init();
authority = polkit_authority_get();
result = polkit_authority_check_authorization_sync(authority,
@@ -65,12 +64,14 @@ static PolkitResult do_check(PolkitSubject *subject, const char *action_id)
PolkitResult polkit_check_authorization(const char *dbus_name, const char *action_id)
{
+ g_type_init();
PolkitSubject *subject = polkit_system_bus_name_new(dbus_name);
return do_check(subject, action_id);
}
PolkitResult polkit_check_authorization(pid_t pid, const char *action_id)
{
+ g_type_init();
PolkitSubject *subject = polkit_unix_process_new(pid);
return do_check(subject, action_id);
}