Blame SOURCES/0001-systemd-ensure-that-accounts-service-starts-after-NS.patch

578d4e
From 3d6d125917073b06849c336c93e475a5a43c0dd9 Mon Sep 17 00:00:00 2001
578d4e
From: Stephen Gallagher <sgallagh@redhat.com>
578d4e
Date: Fri, 17 Oct 2014 11:43:39 -0400
578d4e
Subject: [PATCH] systemd: ensure that accounts service starts after NSS
578d4e
 initializes
578d4e
578d4e
The various NSS calls don't give accurate results in some configurations
578d4e
until midway through boot up.  This is because SSSD or winbind (or
578d4e
whatever) needs to initialize.
578d4e
578d4e
In order to prevent accounts service from using NSS prematurely, we need
578d4e
to add an ordering constraint between the nss-user-lookup.target and
578d4e
accountsservice.
578d4e
578d4e
This commit accomplishes this by adding the appropriate Wants= and
578d4e
After= directives to the accountsservice systemd unit file.
578d4e
---
578d4e
 data/accounts-daemon.service.in | 6 ++++++
578d4e
 1 file changed, 6 insertions(+)
578d4e
578d4e
diff --git a/data/accounts-daemon.service.in b/data/accounts-daemon.service.in
578d4e
index 105bf6a..feedf3e 100644
578d4e
--- a/data/accounts-daemon.service.in
578d4e
+++ b/data/accounts-daemon.service.in
578d4e
@@ -1,15 +1,21 @@
578d4e
 [Unit]
578d4e
 Description=Accounts Service
578d4e
 
578d4e
+# In order to avoid races with identity-providing services like SSSD or
578d4e
+# winbind, we need to ensure that Accounts Service starts after
578d4e
+# nss-user-lookup.target
578d4e
+After=nss-user-lookup.target ypbind.service
578d4e
+Wants=nss-user-lookup.target
578d4e
+
578d4e
 [Service]
578d4e
 Type=dbus
578d4e
 BusName=org.freedesktop.Accounts
578d4e
 ExecStart=@libexecdir@/accounts-daemon
578d4e
 StandardOutput=syslog
578d4e
 
578d4e
 [Install]
578d4e
 # We pull this in by graphical.target instead of waiting for the bus
578d4e
 # activation, to speed things up a little: gdm uses this anyway so it is nice
578d4e
 # if it is already around when gdm wants to use it and doesn't have to wait for
578d4e
 # it.
578d4e
 WantedBy=graphical.target
578d4e
-- 
578d4e
2.3.7
578d4e