Blame SOURCES/polkit-0.112-bus-conn-msg-ssh.patch

f322fc
From 0ce0a7b3298d7b0fd5ce8c6775bcef9b0caf1bdb Mon Sep 17 00:00:00 2001
f322fc
From: David Herrmann <dh.herrmann@gmail.com>
f322fc
Date: Wed, 4 Jul 2018 13:51:24 +0200
f322fc
Subject: [PATCH] polkitagent: suppress disconnect messages
f322fc
f322fc
The polkitagent may be used by pkexec and friends. These might very
f322fc
well survive until very late during system shutdown. Hence, a
f322fc
disconnect of polkitd during runtime might be expected [1].
f322fc
f322fc
This patch silences the disconnect/reconnect messages and turns them
f322fc
into debug messages. This only affects the polkit-agent, it does not
f322fc
affect the polkit-daemon implementation.
f322fc
f322fc
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1249627
f322fc
---
f322fc
 src/polkitagent/polkitagentlistener.c | 12 ++++++------
f322fc
 1 file changed, 6 insertions(+), 6 deletions(-)
f322fc
f322fc
diff --git a/src/polkitagent/polkitagentlistener.c b/src/polkitagent/polkitagentlistener.c
f322fc
index debd1bb..1c8b666 100644
f322fc
--- a/src/polkitagent/polkitagentlistener.c
f322fc
+++ b/src/polkitagent/polkitagentlistener.c
f322fc
@@ -178,10 +178,10 @@ on_notify_authority_owner (GObject    *object,
f322fc
   owner = polkit_authority_get_owner (server->authority);
f322fc
   if (owner == NULL)
f322fc
     {
f322fc
-      g_printerr ("PolicyKit daemon disconnected from the bus.\n");
f322fc
+      g_debug ("PolicyKit daemon disconnected from the bus.\n");
f322fc
 
f322fc
       if (server->is_registered)
f322fc
-        g_printerr ("We are no longer a registered authentication agent.\n");
f322fc
+        g_debug ("We are no longer a registered authentication agent.\n");
f322fc
 
f322fc
       server->is_registered = FALSE;
f322fc
     }
f322fc
@@ -192,17 +192,17 @@ on_notify_authority_owner (GObject    *object,
f322fc
         {
f322fc
           GError *error;
f322fc
 
f322fc
-          g_printerr ("PolicyKit daemon reconnected to bus.\n");
f322fc
-          g_printerr ("Attempting to re-register as an authentication agent.\n");
f322fc
+          g_debug ("PolicyKit daemon reconnected to bus.\n");
f322fc
+          g_debug ("Attempting to re-register as an authentication agent.\n");
f322fc
 
f322fc
           error = NULL;
f322fc
           if (server_register (server, &error))
f322fc
             {
f322fc
-              g_printerr ("We are now a registered authentication agent.\n");
f322fc
+              g_debug ("We are now a registered authentication agent.\n");
f322fc
             }
f322fc
           else
f322fc
             {
f322fc
-              g_printerr ("Failed to register as an authentication agent: %s\n", error->message);
f322fc
+              g_debug ("Failed to register as an authentication agent: %s\n", error->message);
f322fc
               g_error_free (error);
f322fc
             }
f322fc
         }
f322fc
-- 
f322fc
2.18.0
f322fc