Revert GNOME change to force X authentication

See: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2633

It's a headache for us and it doesn't seem to be necessary because we
don't share network namespace between citadel and (nspawn) realms.
This commit is contained in:
Bruce Leidl 2024-05-06 18:32:28 -04:00
parent eb392568ae
commit ab32580b4c

View File

@ -741,6 +741,23 @@ prepare_auth_file (MetaXWaylandManager *manager,
return TRUE; return TRUE;
} }
static void
add_local_user_to_xhost (Display *xdisplay)
{
XHostAddress host_entry;
XServerInterpretedAddress siaddr;
siaddr.type = (char *) "localuser";
siaddr.typelength = strlen (siaddr.type);
siaddr.value = (char *) g_get_user_name();
siaddr.valuelength = strlen (siaddr.value);
host_entry.family = FamilyServerInterpreted;
host_entry.address = (char *) &siaddr;
XAddHost (xdisplay, &host_entry);
}
static void static void
on_init_x11_cb (MetaDisplay *display, on_init_x11_cb (MetaDisplay *display,
GAsyncResult *result, GAsyncResult *result,
@ -1207,6 +1224,8 @@ meta_xwayland_setup_xdisplay (MetaXWaylandManager *manager,
XSetIOErrorExitHandler (xdisplay, x_io_error_exit, manager); XSetIOErrorExitHandler (xdisplay, x_io_error_exit, manager);
XFixesSetClientDisconnectMode (xdisplay, XFixesClientDisconnectFlagTerminate); XFixesSetClientDisconnectMode (xdisplay, XFixesClientDisconnectFlagTerminate);
add_local_user_to_xhost (xdisplay);
} }
static void static void