summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Zeuthen <davidz@redhat.com>2012-05-25 13:37:49 -0400
committerDavid Zeuthen <davidz@redhat.com>2012-05-25 13:37:49 -0400
commitda49ff95f2d136fd929f0ba5e75408a106f5de3b (patch)
tree4c02f396f06d62226fb04c2cd7852849529d4515 /src
parent8e0383cb9972f5b3b86e64f9b015f53671ce0323 (diff)
downloadpolkit-da49ff95f2d136fd929f0ba5e75408a106f5de3b.tar.gz
Log when the name org.fd.PolicyKit1 has been acquired
Signed-off-by: David Zeuthen <davidz@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/polkitbackend/polkitd.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/polkitbackend/polkitd.c b/src/polkitbackend/polkitd.c
index 6a1bfb0..4cbef2f 100644
--- a/src/polkitbackend/polkitd.c
+++ b/src/polkitbackend/polkitd.c
@@ -53,12 +53,8 @@ on_bus_acquired (GDBusConnection *connection,
g_print ("Connected to the system bus\n");
- g_assert (authority == NULL);
g_assert (registration_id == NULL);
- authority = polkit_backend_authority_get ();
- g_print ("Using authority class %s\n", g_type_name (G_TYPE_FROM_INSTANCE (authority)));
-
error = NULL;
registration_id = polkit_backend_authority_register (authority,
connection,
@@ -77,7 +73,8 @@ on_name_lost (GDBusConnection *connection,
const gchar *name,
gpointer user_data)
{
- g_print ("Lost the name org.freedesktop.PolicyKit1 - exiting\n");
+ polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
+ "Lost the name org.freedesktop.PolicyKit1 - exiting");
g_main_loop_quit (loop);
}
@@ -86,7 +83,8 @@ on_name_acquired (GDBusConnection *connection,
const gchar *name,
gpointer user_data)
{
- g_print ("Acquired the name org.freedesktop.PolicyKit1\n");
+ polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
+ "Acquired the name org.freedesktop.PolicyKit1 on the system bus");
}
static gboolean
@@ -216,6 +214,8 @@ main (int argc,
if (g_getenv ("PATH") == NULL)
g_setenv ("PATH", "/usr/bin:/bin:/usr/sbin:/sbin", TRUE);
+ authority = polkit_backend_authority_get ();
+
loop = g_main_loop_new (NULL, FALSE);
sigint_id = g_unix_signal_add (SIGINT,