Fix polyinstantiation preventing Xwayland to start
Resolves: RHEL-91324
This commit is contained in:
parent
bacb152898
commit
79bcc52012
@ -0,0 +1,31 @@
|
||||
From 26abcb62d4838774956cebaa66465d56e7375904 Mon Sep 17 00:00:00 2001
|
||||
From: Nathan Pratta Teodosio <nathan.teodosio@canonical.com>
|
||||
Date: Thu, 29 Aug 2024 09:25:13 +0200
|
||||
Subject: [PATCH 1/2] Be more verbose about permissions of /tmp/{,.X11-unix}.
|
||||
|
||||
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3984>
|
||||
(cherry picked from commit 4dbaa8178116649076bf542a5eaf42d4ce804e5b)
|
||||
---
|
||||
src/wayland/meta-xwayland.c | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/wayland/meta-xwayland.c b/src/wayland/meta-xwayland.c
|
||||
index e405161c1d..98c0d502f5 100644
|
||||
--- a/src/wayland/meta-xwayland.c
|
||||
+++ b/src/wayland/meta-xwayland.c
|
||||
@@ -545,8 +545,10 @@ ensure_x11_unix_perms (GError **error)
|
||||
if (x11_tmp.st_uid != tmp.st_uid && x11_tmp.st_uid != getuid ())
|
||||
{
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED,
|
||||
- "Wrong ownership for directory \"%s\"",
|
||||
- X11_TMP_UNIX_DIR);
|
||||
+ "Wrong ownership for directory \"%s\", owned by %d but "
|
||||
+ "should be same as %s (owned by (%d)) or %d",
|
||||
+ X11_TMP_UNIX_DIR, x11_tmp.st_uid, TMP_UNIX_DIR, tmp.st_uid,
|
||||
+ getuid ());
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
--
|
||||
2.50.0
|
||||
|
@ -0,0 +1,34 @@
|
||||
From d879589372a7857e1314773ff033ae54060f5648 Mon Sep 17 00:00:00 2001
|
||||
From: Nathan Pratta Teodosio <nathan.teodosio@canonical.com>
|
||||
Date: Fri, 13 Jun 2025 11:24:24 +0200
|
||||
Subject: [PATCH 2/2] Use 'access' instead of checking permission modes for
|
||||
/tmp/.X11-unix/.
|
||||
|
||||
The previous version was missing the 200 case with the directory owned by the
|
||||
current user.
|
||||
|
||||
C.f. https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7857,
|
||||
https://launchpad.net/bugs/2069564.
|
||||
|
||||
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3984>
|
||||
(cherry picked from commit 36ca36b48e7efd6846fac7533a4f2e97959a8ad6)
|
||||
---
|
||||
src/wayland/meta-xwayland.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/wayland/meta-xwayland.c b/src/wayland/meta-xwayland.c
|
||||
index 98c0d502f5..a7d273e53c 100644
|
||||
--- a/src/wayland/meta-xwayland.c
|
||||
+++ b/src/wayland/meta-xwayland.c
|
||||
@@ -553,7 +553,7 @@ ensure_x11_unix_perms (GError **error)
|
||||
}
|
||||
|
||||
/* ... be writable ... */
|
||||
- if ((x11_tmp.st_mode & 0022) != 0022)
|
||||
+ if (access (X11_TMP_UNIX_DIR, W_OK) != 0)
|
||||
{
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED,
|
||||
"Directory \"%s\" is not writable",
|
||||
--
|
||||
2.50.0
|
||||
|
@ -94,6 +94,10 @@ Patch: 0003-tests-Add-drm-lease-test-for-non-non-desktop-hotplug.patch
|
||||
Patch: 0004-output-Add-pause-resume-signals.patch
|
||||
Patch: 0005-drm-lease-Treat-connectors-as-unleasable-when-inacti.patch
|
||||
|
||||
# Backport 'Write access checks for /tmp/.X11-unix/' (RHEL-91324)
|
||||
Patch: 0001-Be-more-verbose-about-permissions-of-tmp-.X11-unix.patch
|
||||
Patch: 0002-Use-access-instead-of-checking-permission-modes-for-.patch
|
||||
|
||||
BuildRequires: pkgconfig(gobject-introspection-1.0) >= 1.41.0
|
||||
BuildRequires: pkgconfig(sm)
|
||||
BuildRequires: pkgconfig(libwacom)
|
||||
|
Loading…
Reference in New Issue
Block a user