[Xfce4-commits] <xfce4-session:master> Fix logout with sudo.

Nick Schermer noreply at xfce.org
Sun Nov 7 13:00:02 CET 2010


Updating branch refs/heads/master
         to 6f8746b55cbbe1687c4978da55905177cc860968 (commit)
       from 035fa27c51e58064001e98db52c51f2eeb00d935 (commit)

commit 6f8746b55cbbe1687c4978da55905177cc860968
Author: Landry Breuil <landry at openbsd.org>
Date:   Sun Nov 7 12:59:01 2010 +0100

    Fix logout with sudo.

 xfce4-session/xfsm-shutdown-helper.c |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/xfce4-session/xfsm-shutdown-helper.c b/xfce4-session/xfsm-shutdown-helper.c
index e0a65e8..e6c2817 100644
--- a/xfce4-session/xfsm-shutdown-helper.c
+++ b/xfce4-session/xfsm-shutdown-helper.c
@@ -1331,13 +1331,20 @@ xfsm_shutdown_helper_init (XfsmShutdownHelper *helper)
       xfsm_shutdown_helper_check_backends (helper);
     }
   else
-    /* Unable to connect to the system bus, just try sudo*/
     {
-      g_critical ("Failed to connect to the system bus : %s", error->message);
+      g_warning ("Failed to connect to the system bus : %s", error->message);
       g_error_free (error);
 
+      /* Unable to connect to the system bus, just try sudo */
       if (xfsm_shutdown_helper_check_sudo (helper))
-        helper->shutdown_backend = XFSM_SHUTDOWN_BACKEND_SUDO;
+        {
+          helper->shutdown_backend = XFSM_SHUTDOWN_BACKEND_SUDO;
+
+          helper->can_shutdown = TRUE;
+          helper->can_restart = TRUE;
+          helper->auth_shutdown = TRUE;
+          helper->auth_restart  = TRUE;
+        }
     }
 }
 
@@ -1645,7 +1652,7 @@ xfsm_shutdown_helper_sudo_send (XfsmShutdownHelper *helper,
   fprintf (helper->outfile, "%s\n", action);
   fflush (helper->outfile);
 
-  g_message (G_STRLOC ": Using ConsoleKit to %s",action);
+  g_message (G_STRLOC ": Using sudo to %s", action);
 
   if (ferror (helper->outfile))
     {



More information about the Xfce4-commits mailing list