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

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