Blame fix-sssd-race.patch
|
Ray Strode |
29fc72 |
From 3d6d125917073b06849c336c93e475a5a43c0dd9 Mon Sep 17 00:00:00 2001
|
|
Ray Strode |
29fc72 |
From: Stephen Gallagher <sgallagh@redhat.com>
|
|
Ray Strode |
29fc72 |
Date: Fri, 17 Oct 2014 11:43:39 -0400
|
|
Ray Strode |
29fc72 |
Subject: systemd: ensure that accounts service starts after NSS initializes
|
|
Ray Strode |
29fc72 |
|
|
Ray Strode |
29fc72 |
The various NSS calls don't give accurate results in some configurations
|
|
Ray Strode |
29fc72 |
until midway through boot up. This is because SSSD or winbind (or
|
|
Ray Strode |
29fc72 |
whatever) needs to initialize.
|
|
Ray Strode |
29fc72 |
|
|
Ray Strode |
29fc72 |
In order to prevent accounts service from using NSS prematurely, we need
|
|
Ray Strode |
29fc72 |
to add an ordering constraint between the nss-user-lookup.target and
|
|
Ray Strode |
29fc72 |
accountsservice.
|
|
Ray Strode |
29fc72 |
|
|
Ray Strode |
29fc72 |
This commit accomplishes this by adding the appropriate Wants= and
|
|
Ray Strode |
29fc72 |
After= directives to the accountsservice systemd unit file.
|
|
Ray Strode |
29fc72 |
|
|
Ray Strode |
29fc72 |
diff --git a/data/accounts-daemon.service.in b/data/accounts-daemon.service.in
|
|
Ray Strode |
29fc72 |
index 105bf6a..feedf3e 100644
|
|
Ray Strode |
29fc72 |
--- a/data/accounts-daemon.service.in
|
|
Ray Strode |
29fc72 |
+++ b/data/accounts-daemon.service.in
|
|
Ray Strode |
29fc72 |
@@ -1,6 +1,12 @@
|
|
Ray Strode |
29fc72 |
[Unit]
|
|
Ray Strode |
29fc72 |
Description=Accounts Service
|
|
Ray Strode |
29fc72 |
|
|
Ray Strode |
29fc72 |
+# In order to avoid races with identity-providing services like SSSD or
|
|
Ray Strode |
29fc72 |
+# winbind, we need to ensure that Accounts Service starts after
|
|
Ray Strode |
29fc72 |
+# nss-user-lookup.target
|
|
Ray Strode |
29fc72 |
+After=nss-user-lookup.target
|
|
Ray Strode |
29fc72 |
+Wants=nss-user-lookup.target
|
|
Ray Strode |
29fc72 |
+
|
|
Ray Strode |
29fc72 |
[Service]
|
|
Ray Strode |
29fc72 |
Type=dbus
|
|
Ray Strode |
29fc72 |
BusName=org.freedesktop.Accounts
|
|
Ray Strode |
29fc72 |
--
|
|
Ray Strode |
29fc72 |
cgit v0.10.2
|
|
Ray Strode |
29fc72 |
|
|
Ray Strode |
29fc72 |
|