Accepting request 1193510 from GNOME:Factory
- Drop as-fate318433-prevent-same-account-multi-logins.patch. Gnome-shell now has similar functionality upstream. (forwarded request 1193502 from mgorse) OBS-URL: https://build.opensuse.org/request/show/1193510 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/accountsservice?expand=0&rev=91
This commit is contained in:
commit
2f56bc7cfd
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 12 17:48:05 UTC 2024 - Michael Gorse <mgorse@suse.com>
|
||||
|
||||
- Drop as-fate318433-prevent-same-account-multi-logins.patch.
|
||||
Gnome-shell now has similar functionality upstream.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 19 01:14:06 UTC 2024 - Xiaoguang Wang <xiaoguang.wang@suse.com>
|
||||
|
||||
|
@ -40,10 +40,6 @@ Patch2: accountsservice-filter-suse-accounts.patch
|
||||
# PATCH-FIX-OPENSUSE harden_accounts-daemon.service.patch jsegitz@suse.com -- For details please see https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
|
||||
Patch3: harden_accounts-daemon.service.patch
|
||||
|
||||
## SLE and Leap only patches start at 1000
|
||||
# PATCH-FEATURE-SLE as-fate318433-prevent-same-account-multi-logins.patch fate#318433 cxiong@suse.com -- prevent multiple simultaneous login.
|
||||
Patch1000: as-fate318433-prevent-same-account-multi-logins.patch
|
||||
|
||||
BuildRequires: gtk-doc
|
||||
BuildRequires: meson
|
||||
BuildRequires: pkgconfig
|
||||
@ -118,15 +114,7 @@ This package contains the Vala bindings for accountservice.
|
||||
%setup -q
|
||||
# inject patched mocklibc tarball into package cache
|
||||
cp %{SOURCE1} subprojects/packagecache/
|
||||
%patch -P 0 -p1
|
||||
%patch -P 1 -p1
|
||||
%patch -P 2 -p1
|
||||
%patch -P 3 -p1
|
||||
|
||||
# SLE and Leap patches start at 1000
|
||||
%if 0%{?sle_version}
|
||||
%patch -P 1000 -p1
|
||||
%endif
|
||||
%autopatch -p1
|
||||
|
||||
%build
|
||||
%meson \
|
||||
|
@ -1,78 +0,0 @@
|
||||
Index: accountsservice-23.13.9/src/libaccountsservice/act-user.c
|
||||
===================================================================
|
||||
--- accountsservice-23.13.9.orig/src/libaccountsservice/act-user.c
|
||||
+++ accountsservice-23.13.9/src/libaccountsservice/act-user.c
|
||||
@@ -878,6 +878,8 @@ act_user_is_logged_in (ActUser *user)
|
||||
* (Currently, this function is only implemented for systemd-logind.
|
||||
* For ConsoleKit, it is equivalent to act_user_is_logged_in.)
|
||||
*
|
||||
+ * (SLE-12 SP2: 'other_sessions' have been modified to contain only X sessions)
|
||||
+ *
|
||||
* Returns: %TRUE or %FALSE
|
||||
*/
|
||||
gboolean
|
||||
@@ -906,6 +908,24 @@ act_user_get_saved (ActUser *user)
|
||||
}
|
||||
|
||||
/**
|
||||
+ * act_user_is_x_logged_in_remotely:
|
||||
+ * @user: a #ActUser
|
||||
+ *
|
||||
+ * Returns whether or not #ActUser is currently graphically logged in on a
|
||||
+ * different seat or no seat.
|
||||
+ *
|
||||
+ * (For SLE12-SP2: fate#318433)
|
||||
+ *
|
||||
+ * Returns: %TRUE or %FALSE
|
||||
+ */
|
||||
+gboolean
|
||||
+act_user_is_x_logged_in_remotely (ActUser *user)
|
||||
+{
|
||||
+ /* return user->remote_x_sessions; */
|
||||
+ return (user->other_sessions != NULL);
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
* act_user_get_locked:
|
||||
* @user: a #ActUser
|
||||
*
|
||||
Index: accountsservice-23.13.9/src/libaccountsservice/act-user.h
|
||||
===================================================================
|
||||
--- accountsservice-23.13.9.orig/src/libaccountsservice/act-user.h
|
||||
+++ accountsservice-23.13.9/src/libaccountsservice/act-user.h
|
||||
@@ -60,6 +60,7 @@ guint act_user_get_num_sessions
|
||||
guint act_user_get_num_sessions_anywhere (ActUser *user);
|
||||
gboolean act_user_is_logged_in (ActUser *user);
|
||||
gboolean act_user_is_logged_in_anywhere (ActUser *user);
|
||||
+gboolean act_user_is_x_logged_in_remotely (ActUser *user);
|
||||
int act_user_get_login_frequency (ActUser *user);
|
||||
gint64 act_user_get_login_time (ActUser *user);
|
||||
const GVariant *act_user_get_login_history (ActUser *user);
|
||||
Index: accountsservice-23.13.9/src/libaccountsservice/act-user-manager.c
|
||||
===================================================================
|
||||
--- accountsservice-23.13.9.orig/src/libaccountsservice/act-user-manager.c
|
||||
+++ accountsservice-23.13.9/src/libaccountsservice/act-user-manager.c
|
||||
@@ -1425,12 +1425,22 @@ maybe_add_new_session (ActUserManagerNew
|
||||
if (new_session->x11_display == NULL) {
|
||||
g_debug ("AcUserManager: (mostly) ignoring session '%s' since it's not graphical",
|
||||
new_session->id);
|
||||
- is_ours = FALSE;
|
||||
+ /* SLE: ignore non-graphical session completely */
|
||||
+ /* see `act_user_is_logged_in_anywhere` */
|
||||
+ unload_new_session (new_session);
|
||||
+ return;
|
||||
} else if (session_is_login_window (manager, new_session->id)) {
|
||||
new_session->state = ACT_USER_MANAGER_NEW_SESSION_STATE_LOADED;
|
||||
unload_new_session (new_session);
|
||||
return;
|
||||
} else if (!session_is_on_our_seat (manager, new_session->id)) {
|
||||
+ /**
|
||||
+ * NOTE: if `manager->priv->seat.id` or `new_session->id` is
|
||||
+ * either NULL, it's not on our seat: this is reasonable, as
|
||||
+ * non-seat session is not switchable and thus no need to be
|
||||
+ * ours. However, this nondiscrimination for all non-seated
|
||||
+ * sessions is possibly a source for bugs.
|
||||
+ */
|
||||
is_ours = FALSE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user