Accepting request 797868 from home:yfjiang:branches:GNOME:Factory
- Burnish gdm-look-for-session-based-on-pid-first.patch according to the upstream change (bsc#1159950, glgo#GNOME/gdm#526). - Disable gnome-initial-setup under gdm mode in Leap and SLE (jsc#SLE-11856). OBS-URL: https://build.opensuse.org/request/show/797868 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gdm?expand=0&rev=452
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
From 82c3c9bbe924c43e93e74cd622207a54bc44962c Mon Sep 17 00:00:00 2001
|
From 32646105196ed7a687f3684b69ea544dd01d2ade Mon Sep 17 00:00:00 2001
|
||||||
From: Benjamin Berg <bberg@redhat.com>
|
From: Benjamin Berg <bberg@redhat.com>
|
||||||
Date: Thu, 23 Jan 2020 14:32:38 +0100
|
Date: Thu, 23 Jan 2020 14:32:38 +0100
|
||||||
Subject: [PATCH] manager: Try looking up session based on PID first
|
Subject: [PATCH] manager: Try looking up session based on PID first
|
||||||
@@ -21,11 +21,11 @@ See: #526
|
|||||||
libgdm/gdm-user-switching.c | 2 +-
|
libgdm/gdm-user-switching.c | 2 +-
|
||||||
4 files changed, 32 insertions(+), 9 deletions(-)
|
4 files changed, 32 insertions(+), 9 deletions(-)
|
||||||
|
|
||||||
Index: gdm-3.34.1/common/gdm-common.c
|
diff --git a/common/gdm-common.c b/common/gdm-common.c
|
||||||
===================================================================
|
index 41bdb389..b8de7555 100644
|
||||||
--- gdm-3.34.1.orig/common/gdm-common.c
|
--- a/common/gdm-common.c
|
||||||
+++ gdm-3.34.1/common/gdm-common.c
|
+++ b/common/gdm-common.c
|
||||||
@@ -497,7 +497,7 @@ goto_login_session (GDBusConnection *co
|
@@ -497,7 +497,7 @@ goto_login_session (GDBusConnection *connection,
|
||||||
* since the data allocated is from libsystemd-logind, which
|
* since the data allocated is from libsystemd-logind, which
|
||||||
* does not use GLib's g_malloc (). */
|
* does not use GLib's g_malloc (). */
|
||||||
|
|
||||||
@@ -34,14 +34,14 @@ Index: gdm-3.34.1/common/gdm-common.c
|
|||||||
g_propagate_prefixed_error (error, local_error, _("Could not identify the current session: "));
|
g_propagate_prefixed_error (error, local_error, _("Could not identify the current session: "));
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -900,16 +900,38 @@ _systemd_session_is_active (const char *
|
@@ -898,16 +898,38 @@ _systemd_session_is_active (const char *session_id)
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
-gdm_find_display_session_for_uid (const uid_t uid,
|
-gdm_find_display_session_for_uid (const uid_t uid,
|
||||||
- char **out_session_id,
|
- char **out_session_id,
|
||||||
- GError **error)
|
- GError **error)
|
||||||
+gdm_find_display_session (int pid,
|
+gdm_find_display_session (GPid pid,
|
||||||
+ const uid_t uid,
|
+ const uid_t uid,
|
||||||
+ char **out_session_id,
|
+ char **out_session_id,
|
||||||
+ GError **error)
|
+ GError **error)
|
||||||
@@ -61,44 +61,44 @@ Index: gdm-3.34.1/common/gdm-common.c
|
|||||||
+ */
|
+ */
|
||||||
+ res = sd_pid_get_session (pid, &local_session_id);
|
+ res = sd_pid_get_session (pid, &local_session_id);
|
||||||
+ if (res >= 0) {
|
+ if (res >= 0) {
|
||||||
+ g_debug ("Found session %s for PID %d, using", local_session_id, pid);
|
+ g_debug ("GdmCommon: Found session %s for PID %d, using", local_session_id, pid);
|
||||||
+
|
+
|
||||||
+ *out_session_id = g_strdup (local_session_id);
|
+ *out_session_id = g_strdup (local_session_id);
|
||||||
+ g_free (local_session_id);
|
+ free (local_session_id);
|
||||||
+
|
+
|
||||||
+ return TRUE;
|
+ return TRUE;
|
||||||
+ } else {
|
+ } else {
|
||||||
+ if (res != -ENODATA)
|
+ if (res != -ENODATA)
|
||||||
+ g_warning ("Failed to retrieve session information for pid %d: %s",
|
+ g_warning ("GdmCommon: Failed to retrieve session information for pid %d: %s",
|
||||||
+ pid, strerror (-res));
|
+ pid, strerror (-res));
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
g_debug ("Finding a graphical session for user %d", uid);
|
g_debug ("Finding a graphical session for user %d", uid);
|
||||||
|
|
||||||
n_sessions = sd_uid_get_sessions (uid,
|
n_sessions = sd_uid_get_sessions (uid,
|
||||||
Index: gdm-3.34.1/common/gdm-common.h
|
diff --git a/common/gdm-common.h b/common/gdm-common.h
|
||||||
===================================================================
|
index 5c3fe137..001b70c1 100644
|
||||||
--- gdm-3.34.1.orig/common/gdm-common.h
|
--- a/common/gdm-common.h
|
||||||
+++ gdm-3.34.1/common/gdm-common.h
|
+++ b/common/gdm-common.h
|
||||||
@@ -51,9 +51,10 @@ int gdm_wait_on_and_disown_pi
|
@@ -51,9 +51,10 @@ int gdm_wait_on_and_disown_pid (int pid,
|
||||||
int gdm_signal_pid (int pid,
|
int gdm_signal_pid (int pid,
|
||||||
int signal);
|
int signal);
|
||||||
|
|
||||||
-gboolean gdm_find_display_session_for_uid (const uid_t uid,
|
-gboolean gdm_find_display_session_for_uid (const uid_t uid,
|
||||||
- char **out_session_id,
|
- char **out_session_id,
|
||||||
- GError **error);
|
- GError **error);
|
||||||
+gboolean gdm_find_display_session (int pid,
|
+gboolean gdm_find_display_session (GPid pid,
|
||||||
+ const uid_t uid,
|
+ const uid_t uid,
|
||||||
+ char **out_session_id,
|
+ char **out_session_id,
|
||||||
+ GError **error);
|
+ GError **error);
|
||||||
|
|
||||||
gboolean gdm_get_pwent_for_name (const char *name,
|
gboolean gdm_get_pwent_for_name (const char *name,
|
||||||
struct passwd **pwentp);
|
struct passwd **pwentp);
|
||||||
Index: gdm-3.34.1/daemon/gdm-manager.c
|
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
|
||||||
===================================================================
|
index 907eca37..d8dfa843 100644
|
||||||
--- gdm-3.34.1.orig/daemon/gdm-manager.c
|
--- a/daemon/gdm-manager.c
|
||||||
+++ gdm-3.34.1/daemon/gdm-manager.c
|
+++ b/daemon/gdm-manager.c
|
||||||
@@ -501,7 +501,7 @@ get_display_and_details_for_bus_sender (
|
@@ -501,7 +501,7 @@ get_display_and_details_for_bus_sender (GdmManager *self,
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -107,11 +107,11 @@ Index: gdm-3.34.1/daemon/gdm-manager.c
|
|||||||
|
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
g_debug ("GdmManager: Unable to find display session for uid %d: %s",
|
g_debug ("GdmManager: Unable to find display session for uid %d: %s",
|
||||||
Index: gdm-3.34.1/libgdm/gdm-user-switching.c
|
diff --git a/libgdm/gdm-user-switching.c b/libgdm/gdm-user-switching.c
|
||||||
===================================================================
|
index 3a33fcbb..20235fd8 100644
|
||||||
--- gdm-3.34.1.orig/libgdm/gdm-user-switching.c
|
--- a/libgdm/gdm-user-switching.c
|
||||||
+++ gdm-3.34.1/libgdm/gdm-user-switching.c
|
+++ b/libgdm/gdm-user-switching.c
|
||||||
@@ -203,7 +203,7 @@ goto_login_session (GDBusConnection *co
|
@@ -203,7 +203,7 @@ goto_login_session (GDBusConnection *connection,
|
||||||
/* Note that we mostly use free () here, instead of g_free ()
|
/* Note that we mostly use free () here, instead of g_free ()
|
||||||
* since the data allocated is from libsystemd-logind, which
|
* since the data allocated is from libsystemd-logind, which
|
||||||
* does not use GLib's g_malloc (). */
|
* does not use GLib's g_malloc (). */
|
||||||
@@ -120,3 +120,5 @@ Index: gdm-3.34.1/libgdm/gdm-user-switching.c
|
|||||||
g_propagate_prefixed_error (error, local_error, _("Could not identify the current session: "));
|
g_propagate_prefixed_error (error, local_error, _("Could not identify the current session: "));
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
--
|
||||||
|
2.26.2
|
||||||
|
12
gdm.changes
12
gdm.changes
@@ -1,3 +1,15 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Apr 26 09:42:29 UTC 2020 - Yifan Jiang <yfjiang@suse.com>
|
||||||
|
|
||||||
|
- Burnish gdm-look-for-session-based-on-pid-first.patch according
|
||||||
|
to the upstream change (bsc#1159950, glgo#GNOME/gdm#526).
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Apr 22 01:32:07 UTC 2020 - Yifan Jiang <yfjiang@suse.com>
|
||||||
|
|
||||||
|
- Disable gnome-initial-setup under gdm mode in Leap and SLE
|
||||||
|
(jsc#SLE-11856).
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Apr 18 16:12:21 UTC 2020 - Bjørn Lie <bjorn.lie@gmail.com>
|
Sat Apr 18 16:12:21 UTC 2020 - Bjørn Lie <bjorn.lie@gmail.com>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user