Commit b2ba655
committed
pcscd.service: add missing Requires=polkit.service
"Since v2.0.1, PCSCD uses polkit by default.
After an upgrade to a pcscd version 2.0.1 and newer, I run in problems
with the polkit dependency during shutdown. My own service uses pcscd
for smartcard communication. During shutdown of my service, a last
command is sent to the card. My service is a systemd service just as
pcscd and polkit are. My systemd config refers to pcscd via
Requires=pcscd.service in its systemd config file.
When in shutdown state, systemd terminates all services. Terminated of
pcscd is blocked until my service is terminated due to the Requires
condition. However, my last smartcard communication fails due to early
termination of polkit (and prevention of re-activating it) with the
following error:
systemd[1]: polkit.service: Deactivated successfully.
...
dbus-daemon[499]: [system] Activating via systemd: service name='org.freedesktop.PolicyKit1' unit='polkit.service' requested by ':1.750' (uid=0 pid=31251 comm="/usr/sbin/pcscd --foreground --auto-exit --debug")
dbus-daemon[499]: [system] Activation via systemd failed for unit 'polkit.service': Refusing activation, D-Bus is shutting down.
pcscd[31251]: 00005785 /usr/src/debug/pcsc-lite/2.0.3/src/auth.c:92:IsClientAuthorized() polkit_authority_get_sync failed: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: Refusing activation, D-Bus is shutting down.
...
pcscd[31251]: 00000014 /usr/src/debug/pcsc-lite/2.0.3/src/winscard_svc.c:355:ContextThread() Rejected unauthorized PC/SC client
I can prevent this error by adding a Requires=polkit.service to pcscd's
systemd service configuration."
Thanks to Jan Grieb for the bug report and the solution.
"Polkit.service dependency not reflected in pcscd.service.in #227"
Closes: #2271 parent ba9ca37 commit b2ba655
2 files changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
126 | 127 | | |
127 | 128 | | |
128 | 129 | | |
| |||
0 commit comments