Accepting request 418925 from GNOME:Factory
Scripted push of project GNOME:Factory OBS-URL: https://build.opensuse.org/request/show/418925 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/accountsservice?expand=0&rev=47
This commit is contained in:
commit
b42419a243
41
accountsservice-933083-load-root-setting.patch
Normal file
41
accountsservice-933083-load-root-setting.patch
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
diff -urp accountsservice-0.6.40.orig/src/daemon.c accountsservice-0.6.40/src/daemon.c
|
||||||
|
--- accountsservice-0.6.40.orig/src/daemon.c 2014-11-03 21:46:00.000000000 -0600
|
||||||
|
+++ accountsservice-0.6.40/src/daemon.c 2016-04-14 14:35:00.644563940 -0500
|
||||||
|
@@ -234,7 +234,8 @@ entry_generator_cachedir (GHashTable *us
|
||||||
|
static void
|
||||||
|
load_entries (Daemon *daemon,
|
||||||
|
GHashTable *users,
|
||||||
|
- EntryGeneratorFunc entry_generator)
|
||||||
|
+ EntryGeneratorFunc entry_generator,
|
||||||
|
+ gboolean force_load)
|
||||||
|
{
|
||||||
|
gpointer generator_state = NULL;
|
||||||
|
struct passwd *pwent;
|
||||||
|
@@ -248,7 +249,7 @@ load_entries (Daemon *daemon
|
||||||
|
break;
|
||||||
|
|
||||||
|
/* Skip system users... */
|
||||||
|
- if (!user_classify_is_human (pwent->pw_uid, pwent->pw_name, pwent->pw_shell, NULL)) {
|
||||||
|
+ if (!force_load && !user_classify_is_human (pwent->pw_uid, pwent->pw_name, pwent->pw_shell, NULL)) {
|
||||||
|
g_debug ("skipping user: %s", pwent->pw_name);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
@@ -306,15 +307,15 @@ reload_users (Daemon *daemon)
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Load the local users into our hash table */
|
||||||
|
- load_entries (daemon, users, entry_generator_fgetpwent);
|
||||||
|
+ load_entries (daemon, users, entry_generator_fgetpwent, FALSE);
|
||||||
|
local = g_hash_table_new (g_str_hash, g_str_equal);
|
||||||
|
g_hash_table_iter_init (&iter, users);
|
||||||
|
while (g_hash_table_iter_next (&iter, &name, NULL))
|
||||||
|
g_hash_table_add (local, name);
|
||||||
|
|
||||||
|
/* Now add/update users from other sources, possibly non-local */
|
||||||
|
- load_entries (daemon, users, wtmp_helper_entry_generator);
|
||||||
|
- load_entries (daemon, users, entry_generator_cachedir);
|
||||||
|
+ load_entries (daemon, users, wtmp_helper_entry_generator, FALSE);
|
||||||
|
+ load_entries (daemon, users, entry_generator_cachedir, TRUE);
|
||||||
|
|
||||||
|
/* Mark which users are local, which are not */
|
||||||
|
g_hash_table_iter_init (&iter, users);
|
@ -1,8 +1,9 @@
|
|||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Jul 6 06:23:55 UTC 2016 - fbui@suse.com
|
Wed Jul 6 06:23:55 UTC 2016 - fbui@suse.com
|
||||||
|
|
||||||
- Remove pkgconfig(libsystemd-daemon). Nowadays pkgconfig(libsystemd)
|
- Remove pkgconfig(libsystemd-daemon). Nowadays
|
||||||
is enough and replaces all libsystemd-* libs which are obsolete.
|
pkgconfig(libsystemd) is enough and replaces all libsystemd-*
|
||||||
|
libs which are obsolete.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Jun 15 08:49:03 UTC 2016 - zaitor@opensuse.org
|
Wed Jun 15 08:49:03 UTC 2016 - zaitor@opensuse.org
|
||||||
@ -17,11 +18,31 @@ Wed Jun 15 08:49:03 UTC 2016 - zaitor@opensuse.org
|
|||||||
- Replace pkgconfig(libsystemd-login) for pkgconfig(libsystemd)
|
- Replace pkgconfig(libsystemd-login) for pkgconfig(libsystemd)
|
||||||
BuildRequires following upstream changes.
|
BuildRequires following upstream changes.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri May 27 18:44:02 CST 2016 - cxiong@suse.com
|
||||||
|
|
||||||
|
- Add as-fate318433-prevent-same-account-multi-logins.patch
|
||||||
|
(fate#318433):
|
||||||
|
Prevent multiple simultaneous logins.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Apr 14 19:40:39 UTC 2016 - mgorse@suse.com
|
||||||
|
|
||||||
|
- Update to GNOME 3.20 Fate#318572
|
||||||
|
- Rebased accountsservice-933083-load-root-setting.patch.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jan 11 08:25:13 UTC 2016 - michael@stroeder.com
|
Mon Jan 11 08:25:13 UTC 2016 - michael@stroeder.com
|
||||||
|
|
||||||
- Updated Url.
|
- Updated Url.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jun 4 03:48:25 UTC 2015 - dliang@suse.com
|
||||||
|
|
||||||
|
- Add accountsservice-933083-load-root-setting.patch (bnc#933083)
|
||||||
|
Load settings of an account which is not 'human' but can still be
|
||||||
|
able to login to the system. (like 'root')
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Jan 27 18:01:50 UTC 2015 - zaitor@opensuse.org
|
Tue Jan 27 18:01:50 UTC 2015 - zaitor@opensuse.org
|
||||||
|
|
||||||
|
@ -29,6 +29,10 @@ Source: http://www.freedesktop.org/software/accountsservice/%{name}-%{ve
|
|||||||
Patch0: accountsservice-sysconfig.patch
|
Patch0: accountsservice-sysconfig.patch
|
||||||
# PATCH-FIX-OPENSUSE accountsservice-filter-suse-accounts.patch vuntz@opensuse.org -- Filter out some system users that are specific to openSUSE
|
# PATCH-FIX-OPENSUSE accountsservice-filter-suse-accounts.patch vuntz@opensuse.org -- Filter out some system users that are specific to openSUSE
|
||||||
Patch1: accountsservice-filter-suse-accounts.patch
|
Patch1: accountsservice-filter-suse-accounts.patch
|
||||||
|
# PATCH-FIX-SLE accountsservice-933083-load-root-setting.patch bnc#933083 dliang@suse.com -- load the root setting
|
||||||
|
Patch2: accountsservice-933083-load-root-setting.patch
|
||||||
|
# PATCH-FEATURE-SLE as-fate318433-prevent-same-account-multi-logins.patch fate#318433 cxiong@suse.com -- prevent multiple simultaneous login.
|
||||||
|
Patch3: as-fate318433-prevent-same-account-multi-logins.patch
|
||||||
# needed for patch0
|
# needed for patch0
|
||||||
BuildRequires: gnome-common
|
BuildRequires: gnome-common
|
||||||
BuildRequires: gobject-introspection-devel
|
BuildRequires: gobject-introspection-devel
|
||||||
@ -88,6 +92,10 @@ querying and manipulating user account information.
|
|||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
|
%if ! 0%{?is_opensuse}
|
||||||
|
%patch2 -p1
|
||||||
|
%patch3 -p1
|
||||||
|
%endif
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# needed for patch0
|
# needed for patch0
|
||||||
|
98
as-fate318433-prevent-same-account-multi-logins.patch
Normal file
98
as-fate318433-prevent-same-account-multi-logins.patch
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
Index: accountsservice-0.6.40/src/libaccountsservice/act-user-manager.c
|
||||||
|
===================================================================
|
||||||
|
--- accountsservice-0.6.40.orig/src/libaccountsservice/act-user-manager.c
|
||||||
|
+++ accountsservice-0.6.40/src/libaccountsservice/act-user-manager.c
|
||||||
|
@@ -751,8 +751,17 @@ _get_systemd_seat_id (ActUserManager *ma
|
||||||
|
char *seat_id;
|
||||||
|
|
||||||
|
res = sd_session_get_seat (NULL, &seat_id);
|
||||||
|
-
|
||||||
|
- if (res == -ENOENT) {
|
||||||
|
+ /**
|
||||||
|
+ * NOTE: There is no -ENOENT errnum for `sd_session_get_seat`. This
|
||||||
|
+ * possibly an upstream bug. There are also other dubious occurrences of
|
||||||
|
+ * -ENOENT within the source.
|
||||||
|
+ *
|
||||||
|
+ * Change to -ENODATA as this is the normal return for non-seated
|
||||||
|
+ * session like VNC ones and should not report errors. O/w no user
|
||||||
|
+ * sessions will be analyzed.
|
||||||
|
+ */
|
||||||
|
+ /* see https://www.freedesktop.org/software/systemd/man/sd_session_is_active.html */
|
||||||
|
+ if (res == -ENODATA) {
|
||||||
|
seat_id = NULL;
|
||||||
|
} else if (res < 0) {
|
||||||
|
g_warning ("Could not get current seat: %s",
|
||||||
|
@@ -1700,12 +1709,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;
|
||||||
|
}
|
||||||
|
|
||||||
|
Index: accountsservice-0.6.40/src/libaccountsservice/act-user.c
|
||||||
|
===================================================================
|
||||||
|
--- accountsservice-0.6.40.orig/src/libaccountsservice/act-user.c
|
||||||
|
+++ accountsservice-0.6.40/src/libaccountsservice/act-user.c
|
||||||
|
@@ -936,6 +936,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
|
||||||
|
@@ -945,6 +947,24 @@ act_user_is_logged_in_anywhere (ActUser
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
+ * 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-0.6.40/src/libaccountsservice/act-user.h
|
||||||
|
===================================================================
|
||||||
|
--- accountsservice-0.6.40.orig/src/libaccountsservice/act-user.h
|
||||||
|
+++ accountsservice-0.6.40/src/libaccountsservice/act-user.h
|
||||||
|
@@ -67,6 +67,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);
|
Loading…
x
Reference in New Issue
Block a user