PolicyKit: Branch 'err-msgs-to-debug' - 3 commits
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Aug 23 11:47:52 UTC 2018
Rebased ref, commits from common ancestor:
commit 8c1bc8ab182f33a55503d30aa7a4ee96f822d903
Author: Jan Rybar <jrybar at redhat.com>
Date: Wed Aug 15 18:56:43 2018 +0200
Error message raised on every 'systemctl start' in emergency.target
Superuser should know that polkit is not running in emergency.target.
If not, basic info with debug sources is offered instead of error message.
Other usecases taken into account.
diff --git a/src/programs/pkttyagent.c b/src/programs/pkttyagent.c
index bfe00bd..3f324b8 100644
--- a/src/programs/pkttyagent.c
+++ b/src/programs/pkttyagent.c
@@ -160,7 +160,8 @@ main (int argc, char *argv[])
authority = polkit_authority_get_sync (NULL /* GCancellable* */, &error);
if (authority == NULL)
{
- g_printerr ("Error getting authority: %s (%s, %d)\n",
+ g_printerr ("Authorization not available. Check if polkit service is running or see debug message for more information.\n");
+ g_debug ("Error getting authority: %s (%s, %d)\n",
error->message, g_quark_to_string (error->domain), error->code);
g_error_free (error);
ret = 127;
commit b1cc525ff5a50e20c9f921f898f0556e07675e58
Author: Jan Rybar <jrybar at redhat.com>
Date: Wed Aug 15 18:50:56 2018 +0200
Elaborate message printed by polkit when disconnecting from ssh
Polkit raises unnecessarily elaborate warning message when user restarts machine from ssh.
This message was moved to debug mode.
diff --git a/src/polkitagent/polkitagentlistener.c b/src/polkitagent/polkitagentlistener.c
index 2e0e11e..ec271d5 100644
--- a/src/polkitagent/polkitagentlistener.c
+++ b/src/polkitagent/polkitagentlistener.c
@@ -178,10 +178,10 @@ on_notify_authority_owner (GObject *object,
owner = polkit_authority_get_owner (server->authority);
if (owner == NULL)
{
- g_printerr ("PolicyKit daemon disconnected from the bus.\n");
+ g_debug ("PolicyKit daemon disconnected from the bus.\n");
if (server->is_registered)
- g_printerr ("We are no longer a registered authentication agent.\n");
+ g_debug ("We are no longer a registered authentication agent.\n");
server->is_registered = FALSE;
}
@@ -192,17 +192,17 @@ on_notify_authority_owner (GObject *object,
{
GError *error;
- g_printerr ("PolicyKit daemon reconnected to bus.\n");
- g_printerr ("Attempting to re-register as an authentication agent.\n");
+ g_debug ("PolicyKit daemon reconnected to bus.\n");
+ g_debug ("Attempting to re-register as an authentication agent.\n");
error = NULL;
if (server_register (server, &error))
{
- g_printerr ("We are now a registered authentication agent.\n");
+ g_debug ("We are now a registered authentication agent.\n");
}
else
{
- g_printerr ("Failed to register as an authentication agent: %s\n", error->message);
+ g_debug ("Failed to register as an authentication agent: %s\n", error->message);
g_error_free (error);
}
}
commit c747ce10fb7b6efd600712e159a8121c41093a58
Author: Ray Strode <rstrode at redhat.com>
Date: Thu Aug 16 10:20:43 2018 -0400
HACKING: add link to Code of Conduct
diff --git a/HACKING b/HACKING
index 14f30cd..2befb00 100644
--- a/HACKING
+++ b/HACKING
@@ -91,3 +91,13 @@ Coding Style
heuristically parse a file and accept not-well-formed
data). Avoiding heuristics is also important for security reasons;
if it looks funny, ignore it (or exit, or disconnect).
+
+Code of Conduct
+===
+As with other projects hosted on freedesktop.org, Polkit follows its
+Code of Conduct, based on the Contributor Covenant. Please conduct
+yourself in a respectful and civilized manner when using the above
+mailing lists, bug trackers, etc:
+
+ https://www.freedesktop.org/wiki/CodeOfConduct
+
More information about the hal-commit
mailing list