Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 637917 Details for
Bug 872797
lightdm: provide polkit .rules for actions
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch to switch to using logind, insted of ConsoleKit
power.patch (text/plain), 2.75 KB, created by
Tim Lauridsen
on 2012-11-04 08:44:30 UTC
(
hide
)
Description:
patch to switch to using logind, insted of ConsoleKit
Filename:
MIME Type:
Creator:
Tim Lauridsen
Created:
2012-11-04 08:44:30 UTC
Size:
2.75 KB
patch
obsolete
>--- liblightdm-gobject/power.c 2011-12-08 20:51:23.000000000 -0500 >+++ liblightdm-gobject/power.c 2012-11-04 03:28:50.122929654 -0500 >@@ -111,19 +111,21 @@ > } > > static gboolean >-ck_call_function (const gchar *function, gboolean default_result, GError **error) >+login1_call_function (const gchar *function, gboolean default_result, GError **error) > { > GVariant *result; > gboolean function_result = FALSE; >+ const gchar *true_result = "yes"; >+ gchar *str_result; > > if (!ck_proxy) > { > ck_proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM, > G_DBUS_PROXY_FLAGS_NONE, > NULL, >- "org.freedesktop.ConsoleKit", >- "/org/freedesktop/ConsoleKit/Manager", >- "org.freedesktop.ConsoleKit.Manager", >+ "org.freedesktop.login1", >+ "/org/freedesktop/login1/Manager", >+ "org.freedesktop.login1.Manager", > NULL, > error); > if (!ck_proxy) >@@ -142,8 +144,20 @@ > return default_result; > > if (g_variant_is_of_type (result, G_VARIANT_TYPE ("(b)"))) >- g_variant_get (result, "(b)", &function_result); >+ g_variant_get (result, "(s)", &function_result); > >+ /** >+ * CanReboot, CanPowerOff returns a string "yes" or "no"", not a boolean as ConsoleKit >+ **/ >+ if (g_variant_is_of_type (result, G_VARIANT_TYPE ("(s)"))) { >+ g_variant_get (result, "(b)", str_result); >+ if(g_strcmp0(str_result,true_result) == 0) { >+ function_result = TRUE; >+ } >+ else { >+ function_result = FALSE; >+ } >+ } > g_variant_unref (result); > return function_result; > } >@@ -158,7 +172,7 @@ > gboolean > lightdm_get_can_restart (void) > { >- return ck_call_function ("CanRestart", FALSE, NULL); >+ return login1_call_function ("CanReboot", FALSE, NULL); > } > > /** >@@ -172,7 +186,7 @@ > gboolean > lightdm_restart (GError **error) > { >- return ck_call_function ("Restart", TRUE, error); >+ return login1_call_function ("Reboot", TRUE, error); > } > > /** >@@ -185,7 +199,7 @@ > gboolean > lightdm_get_can_shutdown (void) > { >- return ck_call_function ("CanStop", FALSE, NULL); >+ return login1_call_function ("CanPowerOff", FALSE, NULL); > } > > /** >@@ -199,5 +213,5 @@ > gboolean > lightdm_shutdown (GError **error) > { >- return ck_call_function ("Stop", TRUE, error); >+ return login1_call_function ("PowerOff", TRUE, error); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 872797
:
637444
|
637917
|
638822
|
638836
|
639188
|
640074