From b0e7050b6d9264a7a234a2b7a4415d9ffc41945f Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Sep 25 2018 00:39:55 +0000 Subject: Update to 0.6.50, plus a couple of backported patches --- diff --git a/0001-lib-don-t-set-loaded-state-until-seat-is-fetched.patch b/0001-lib-don-t-set-loaded-state-until-seat-is-fetched.patch new file mode 100644 index 0000000..1ed23fa --- /dev/null +++ b/0001-lib-don-t-set-loaded-state-until-seat-is-fetched.patch @@ -0,0 +1,36 @@ +From c7fa612023a163e8b2352e1170c6df3fceb19b27 Mon Sep 17 00:00:00 2001 +From: Ray Strode +Date: Thu, 19 Jul 2018 13:14:09 -0400 +Subject: [PATCH 1/3] lib: don't set loaded state until seat is fetched + +At the moment we set is-loaded on the user-manager +object as soon as we start fetching the seat, but +we should waiting until the seat is fetched, so +that can_switch() will return the correct value +if the caller waited until the loaded signal +to use it. + +This commit changes the >= to > which I believe +was the original intention anyway. + +https://bugs.freedesktop.org/show_bug.cgi?id=107298 +--- + src/libaccountsservice/act-user-manager.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/libaccountsservice/act-user-manager.c b/src/libaccountsservice/act-user-manager.c +index 325421b..e7e26b1 100644 +--- a/src/libaccountsservice/act-user-manager.c ++++ b/src/libaccountsservice/act-user-manager.c +@@ -2382,7 +2382,7 @@ maybe_set_is_loaded (ActUserManager *manager) + /* Don't set is_loaded yet unless the seat is already loaded enough + * or failed to load. + */ +- if (manager->priv->seat.state >= ACT_USER_MANAGER_SEAT_STATE_GET_ID) { ++ if (manager->priv->seat.state > ACT_USER_MANAGER_SEAT_STATE_GET_ID) { + g_debug ("ActUserManager: Seat loaded, so now setting loaded property"); + } else if (manager->priv->seat.state == ACT_USER_MANAGER_SEAT_STATE_UNLOADED) { + g_debug ("ActUserManager: Seat wouldn't load, so giving up on it and setting loaded property"); +-- +2.19.0 + diff --git a/0002-lib-don-t-fail-loading-if-logind-isn-t-working-right.patch b/0002-lib-don-t-fail-loading-if-logind-isn-t-working-right.patch new file mode 100644 index 0000000..e89227b --- /dev/null +++ b/0002-lib-don-t-fail-loading-if-logind-isn-t-working-right.patch @@ -0,0 +1,45 @@ +From 74fed8d975fd2e2cba644eeb8021393fc81b7151 Mon Sep 17 00:00:00 2001 +From: Ray Strode +Date: Fri, 10 Aug 2018 15:15:51 -0400 +Subject: [PATCH 3/3] lib: don't fail loading if logind isn't working right + +At the moment if logind can fail in two ways when +asking the session associated with the current pid: + +1) ENOENT, the process isn't part of a registered session +2) ENODATA, the mechanism for checking which session a +process is registered with isn't working. + +If we hit the second case then wefail loading the user manager +entirely. This leads to the dbus proxy associated with a user +from loading and the user getting stuck with defaults like a +NULL xsession and systemaccount=TRUE + +This commit changes the behavior for the second case to be +like the first. Namely, to accept there's no associated +session and carry on as best we can. +--- + src/libaccountsservice/act-user-manager.c | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/src/libaccountsservice/act-user-manager.c b/src/libaccountsservice/act-user-manager.c +index e7e26b1..6dc1d15 100644 +--- a/src/libaccountsservice/act-user-manager.c ++++ b/src/libaccountsservice/act-user-manager.c +@@ -1139,12 +1139,9 @@ _get_current_systemd_session_id (ActUserManager *manager) + res = sd_pid_get_session (0, &session_id); + + if (res == -ENOENT) { +- session_id = NULL; +- } else if (res < 0) { + g_debug ("Failed to identify the current session: %s", + strerror (-res)); +- unload_seat (manager); +- return; ++ session_id = NULL; + } + + manager->priv->seat.session_id = g_strdup (session_id); +-- +2.19.0 + diff --git a/accountsservice.spec b/accountsservice.spec index 09cc196..3009d55 100644 --- a/accountsservice.spec +++ b/accountsservice.spec @@ -1,14 +1,18 @@ %global _hardened_build 1 Name: accountsservice -Version: 0.6.49 -Release: 2%{?dist} +Version: 0.6.50 +Release: 1%{?dist} Summary: D-Bus interfaces for querying and manipulating user account information License: GPLv3+ URL: https://www.freedesktop.org/wiki/Software/AccountsService/ #VCS: git:git://git.freedesktop.org/accountsservice Source0: http://www.freedesktop.org/software/accountsservice/accountsservice-%{version}.tar.xz +# Backports of a couple of post-0.6.50 bugfixes from master +# https://bugzilla.redhat.com/show_bug.cgi?id=1576903 +Patch0: 0001-lib-don-t-set-loaded-state-until-seat-is-fetched.patch +Patch1: 0002-lib-don-t-fail-loading-if-logind-isn-t-working-right.patch BuildRequires: glib2-devel BuildRequires: polkit-devel @@ -98,6 +102,10 @@ rm $RPM_BUILD_ROOT%{_libdir}/*.a %{_datadir}/gtk-doc/html/libaccountsservice/* %changelog +* Mon Sep 24 2018 Adam Williamson - 0.6.50-1 +- Update to 0.6.50, plus a couple of backported patches + Resolves: #1576903 + * Thu Jul 12 2018 Fedora Release Engineering - 0.6.49-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild diff --git a/sources b/sources index 37ff82d..b8743b9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (accountsservice-0.6.49.tar.xz) = 4077f7d401f1964ca909ca1188297b09137d553f578ceea1d648827d5bef3a4a86180b4d715b82434d047fdf764fc5c684c95479c3510b17f10253f1e1800f89 +SHA512 (accountsservice-0.6.50.tar.xz) = 6e07cd318452b1cbedeacd729f0ebb200525caf1b09981abb2bac16fd90756a790ebec08aca0a0cea016f14ab27c159a68fe1332ef4bc636c5863b8c61040f64