summaryrefslogtreecommitdiff
blob: 8b0a6efdf075160a4d2a96a70f2445cee08c2d46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
From 6f8746b55cbbe1687c4978da55905177cc860968 Mon Sep 17 00:00:00 2001
From: Landry Breuil <landry@openbsd.org>
Date: Sun, 07 Nov 2010 11:59:01 +0000
Subject: Fix logout with sudo.

---
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))
     {
--
cgit v0.8.3.4