PolicyKit: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Apr 6 15:36:11 UTC 2022


 src/polkitbackend/polkitd.c |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

New commits:
commit 3583a1d25a50f68fa67d2ec0866e2c5e1bb23710
Author: Vincent Mihalkovic <vmihalko at redhat.com>
Date:   Wed Apr 6 15:36:09 2022 +0000

    polkitd: consider connection to the system bus in return value

diff --git a/src/polkitbackend/polkitd.c b/src/polkitbackend/polkitd.c
index 6c57151..c3ec32f 100644
--- a/src/polkitbackend/polkitd.c
+++ b/src/polkitbackend/polkitd.c
@@ -37,6 +37,7 @@
 static PolkitBackendAuthority *authority = NULL;
 static gpointer                registration_id = NULL;
 static GMainLoop              *loop = NULL;
+static gint                    exit_status = EXIT_FAILURE;
 static gboolean                opt_replace = FALSE;
 static gboolean                opt_no_debug = FALSE;
 static GOptionEntry            opt_entries[] = {
@@ -84,6 +85,8 @@ on_name_acquired (GDBusConnection *connection,
                   const gchar     *name,
                   gpointer         user_data)
 {
+  exit_status = EXIT_SUCCESS;
+
   polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
                                 "Acquired the name org.freedesktop.PolicyKit1 on the system bus");
 }
@@ -159,11 +162,9 @@ main (int    argc,
 {
   GError *error;
   GOptionContext *opt_context;
-  gint ret;
   guint name_owner_id;
   guint sigint_id;
 
-  ret = 1;
   loop = NULL;
   opt_context = NULL;
   name_owner_id = 0;
@@ -237,8 +238,6 @@ main (int    argc,
   g_print ("Entering main event loop\n");
   g_main_loop_run (loop);
 
-  ret = 0;
-
   g_print ("Shutting down\n");
  out:
   if (sigint_id > 0)
@@ -254,6 +253,6 @@ main (int    argc,
   if (opt_context != NULL)
     g_option_context_free (opt_context);
 
-  g_print ("Exiting with code %d\n", ret);
-  return ret;
+  g_print ("Exiting with code %d\n", exit_status);
+  return exit_status;
 }


More information about the hal-commit mailing list