[accountsservice] More ListCachedUsers race fixes (this time with SSSD)
Ray Strode
rstrode at fedoraproject.org
Fri Oct 17 15:51:49 UTC 2014
commit 29fc725b4f0f15fe1c19228a77b348ba0f1db6ab
Author: Ray Strode <rstrode at redhat.com>
Date: Fri Oct 17 11:51:12 2014 -0400
More ListCachedUsers race fixes (this time with SSSD)
Related: #1147504
accountsservice.spec | 9 ++++++++-
fix-sssd-race.patch | 37 +++++++++++++++++++++++++++++++++++++
2 files changed, 45 insertions(+), 1 deletions(-)
---
diff --git a/accountsservice.spec b/accountsservice.spec
index 93b4c1a..ebf53f1 100644
--- a/accountsservice.spec
+++ b/accountsservice.spec
@@ -2,7 +2,7 @@
Name: accountsservice
Version: 0.6.39
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: D-Bus interfaces for querying and manipulating user account information
Group: System Environment/Daemons
@@ -26,6 +26,8 @@ Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
+Patch0: fix-sssd-race.patch
+
%package libs
Summary: Client-side library to talk to accountsservice
Group: Development/Libraries
@@ -55,6 +57,7 @@ of these interfaces, based on the useradd, usermod and userdel commands.
%prep
%setup -q
+%patch0 -p1 -b .fix-sssd-race
%build
%configure --enable-user-heuristics
@@ -107,6 +110,10 @@ rm $RPM_BUILD_ROOT%{_libdir}/*.a
%{_datadir}/gtk-doc/html/libaccountsservice/*
%changelog
+* Fri Oct 17 2014 Ray Strode <rstrode at redhat.com> 0.6.39-2
+- More ListCachedUsers race fixes (this time with SSSD)
+ Related: #1147504
+
* Thu Oct 16 2014 Ray Strode <rstrode at redhat.com> 0.6.39-1
- Update to 0.6.39
- Fixes ListCachedUsers race at startup
diff --git a/fix-sssd-race.patch b/fix-sssd-race.patch
new file mode 100644
index 0000000..8f11d82
--- /dev/null
+++ b/fix-sssd-race.patch
@@ -0,0 +1,37 @@
+From 3d6d125917073b06849c336c93e475a5a43c0dd9 Mon Sep 17 00:00:00 2001
+From: Stephen Gallagher <sgallagh at redhat.com>
+Date: Fri, 17 Oct 2014 11:43:39 -0400
+Subject: systemd: ensure that accounts service starts after NSS initializes
+
+The various NSS calls don't give accurate results in some configurations
+until midway through boot up. This is because SSSD or winbind (or
+whatever) needs to initialize.
+
+In order to prevent accounts service from using NSS prematurely, we need
+to add an ordering constraint between the nss-user-lookup.target and
+accountsservice.
+
+This commit accomplishes this by adding the appropriate Wants= and
+After= directives to the accountsservice systemd unit file.
+
+diff --git a/data/accounts-daemon.service.in b/data/accounts-daemon.service.in
+index 105bf6a..feedf3e 100644
+--- a/data/accounts-daemon.service.in
++++ b/data/accounts-daemon.service.in
+@@ -1,6 +1,12 @@
+ [Unit]
+ Description=Accounts Service
+
++# In order to avoid races with identity-providing services like SSSD or
++# winbind, we need to ensure that Accounts Service starts after
++# nss-user-lookup.target
++After=nss-user-lookup.target
++Wants=nss-user-lookup.target
++
+ [Service]
+ Type=dbus
+ BusName=org.freedesktop.Accounts
+--
+cgit v0.10.2
+
+
More information about the scm-commits
mailing list