Files
lightdm/lightdm-xauthlocalhostname-support.patch

52 lines
2.1 KiB
Diff
Raw Permalink Normal View History

Set XAUTHLOCALHOSTNAME to the hostname for local logins to avoid issues in the
session in case the hostname changes.
Index: lightdm-1.30.0/src/seat-local.c
===================================================================
--- lightdm-1.30.0.orig/src/seat-local.c
+++ lightdm-1.30.0/src/seat-local.c
@@ -289,6 +289,7 @@ seat_local_run_script (Seat *seat, Displ
const gchar *path = x_server_local_get_authority_file_path (X_SERVER_LOCAL (display_server));
process_set_env (script, "DISPLAY", x_server_get_address (X_SERVER (display_server)));
process_set_env (script, "XAUTHORITY", path);
+ process_set_env (script, "XAUTHLOCALHOSTNAME", g_get_host_name ());
}
SEAT_CLASS (seat_local_parent_class)->run_script (seat, display_server, script);
Index: lightdm-1.30.0/src/x-authority.c
===================================================================
--- lightdm-1.30.0.orig/src/x-authority.c
+++ lightdm-1.30.0/src/x-authority.c
@@ -68,8 +68,8 @@ x_authority_new_cookie (guint16 family,
XAuthority *
x_authority_new_local_cookie (const gchar *number)
Accepting request 184084 from home:gberh:branches:X11:Utilities - update to version 1.7.7 - Fix uninitialized pointer introduced in 1.7.3 - Enable compile warnings and fix code generating warnings - update to version 1.7.6 - Restore greeter hints that were regressed in 1.7.5. - Don't run greeters through session wrapper - regression in 1.7.5 - Quit Plymouth correctly when using the unity seat type - Release the VT when the system compositor fails to start - Load sessions and greeters from /usr/share/lightdm/sessions and /usr/share/lightdm/greeters. The existing directories are checked if the sessions are not in these directories. - Refactor the Display class so that it merges with the Seat class - Support running the greeter and session in different display servers instead of re-using the same one during a login. - Add more regression tests - Documentation fixes - Set XDG_SEAT and XDG_VTNR environment variables. - Add initial support for Unity (i.e. Mir based) seats. - Add a greeter wrapper option. - Load configuration from /etc/lightdm/lightdm.conf.d. - Fix compile warnings - Fix tests not running from install directory inside checkout. - Fix incorrectly distributed guest-session apparmor data - Fix .pc file for liblightdm-qt5-3 - Add a new option "autologin-in-background" which lets an autologin happen in a second display while still showing the greeter. OBS-URL: https://build.opensuse.org/request/show/184084 OBS-URL: https://build.opensuse.org/package/show/X11:Utilities/lightdm?expand=0&rev=33
2013-07-23 13:31:24 +00:00
{
- gchar hostname[1024];
- gethostname (hostname, 1024);
+ const gchar *hostname;
+ hostname = g_get_host_name ();
return x_authority_new_cookie (XAUTH_FAMILY_LOCAL, (guint8 *) hostname, strlen (hostname), number);
}
Index: lightdm-1.30.0/src/x-server.c
===================================================================
--- lightdm-1.30.0.orig/src/x-server.c
+++ lightdm-1.30.0/src/x-server.c
@@ -15,6 +15,7 @@
#include "x-server.h"
#include "configuration.h"
+#include "x-server-local.h"
typedef struct
2014-09-30 07:57:15 +00:00
{
@@ -161,6 +162,8 @@ x_server_connect_session (DisplayServer
else
l_debug (session, "Not setting XDG_VTNR");
+ if (IS_X_SERVER_LOCAL (display_server))
+ session_set_env (session, "XAUTHLOCALHOSTNAME", g_get_host_name ());
session_set_env (session, "DISPLAY", x_server_get_address (X_SERVER (display_server)));
session_set_xdisplay (session, x_server_get_address (X_SERVER (display_server)));
session_set_remote_host_name (session, x_server_get_hostname (X_SERVER (display_server)));