18350
|
1 |
commit 5685d65267627038533edd92c2655d0c8023766b
|
|
2 |
Author: Halton Huo <[email protected]>
|
|
3 |
Date: Mon Apr 19 16:00:07 2010 +0800
|
|
4 |
|
|
5 |
gdm-26-xdmcp-seatid.diff, specify seat-id when create a XDMCP greeter display.
|
|
6 |
|
|
7 |
Because ':' is not acceptable as valid dbus names, use g_strcanon to
|
|
8 |
replace invalid characters into '_'.
|
|
9 |
|
|
10 |
diff --git a/daemon/gdm-xdmcp-greeter-display.c b/daemon/gdm-xdmcp-greeter-display.c
|
|
11 |
index 2273f4b..6e8c621 100644
|
|
12 |
--- a/daemon/gdm-xdmcp-greeter-display.c
|
|
13 |
+++ b/daemon/gdm-xdmcp-greeter-display.c
|
|
14 |
@@ -104,17 +104,22 @@ gdm_xdmcp_greeter_display_new (const char *hostname,
|
|
15 |
{
|
|
16 |
GObject *object;
|
|
17 |
char *x11_display;
|
|
18 |
+ char *seat_id;
|
|
19 |
|
|
20 |
x11_display = g_strdup_printf ("%s:%d", hostname, number);
|
|
21 |
+ seat_id = g_strdup_printf ("/org/freedesktop/ConsoleKit/XDMCP%s", x11_display);
|
|
22 |
+ seat_id = g_strcanon (seat_id, "ABCDEFGHIGKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-/", '_');
|
|
23 |
object = g_object_new (GDM_TYPE_XDMCP_GREETER_DISPLAY,
|
|
24 |
"remote-hostname", hostname,
|
|
25 |
"x11-display-number", number,
|
|
26 |
"x11-display-name", x11_display,
|
|
27 |
+ "seat-id", seat_id,
|
|
28 |
"is-local", FALSE,
|
|
29 |
"remote-address", address,
|
|
30 |
"session-number", session_number,
|
|
31 |
NULL);
|
|
32 |
g_free (x11_display);
|
|
33 |
+ g_free (seat_id);
|
|
34 |
|
|
35 |
return GDM_DISPLAY (object);
|
|
36 |
}
|