GNU bug report logs - #48987
[PATCH] services: pcscd: Cleanup socket when started.

Previous Next

Package: guix-patches;

Reported by: Brice Waegeneire <brice <at> waegenei.re>

Date: Sat, 12 Jun 2021 21:26:01 UTC

Severity: normal

Tags: patch

Done: Brice Waegeneire <brice <at> waegenei.re>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 48987 in the body.
You can then email your comments to 48987 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#48987; Package guix-patches. (Sat, 12 Jun 2021 21:26:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Brice Waegeneire <brice <at> waegenei.re>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 12 Jun 2021 21:26:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Brice Waegeneire <brice <at> waegenei.re>
To: guix-patches <at> gnu.org
Subject: [PATCH] services: pcscd: Cleanup socket when started.
Date: Sat, 12 Jun 2021 23:24:58 +0200
Otherwise when pcscd doesn't terminate properly (ie. receive a SIGKILL),
it won't start again because of it's socket already existing.

* gnu/services/security-token.scm (pcscd-shepherd-service)[start]:
Remove existing socket file.
---
 gnu/services/security-token.scm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gnu/services/security-token.scm b/gnu/services/security-token.scm
index ec26006538..0cbb591e10 100644
--- a/gnu/services/security-token.scm
+++ b/gnu/services/security-token.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2018 Arun Isaac <arunisaac <at> systemreboot.net>
 ;;; Copyright © 2020 Tobias Geerinckx-Rice <me <at> tobias.gr>
+;;; Copyright © 2021 Brice Waegeneire <brice <at> waegenei.re>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -57,6 +58,9 @@
         (requirement '(syslogd))
         (modules '((gnu build shepherd)))
         (start #~(lambda _
+                   (let ((socket "/run/pcscd/pcscd.comm"))
+                     (when (file-exists? socket)
+                       (delete-file socket)))
                    (invoke #$(file-append pcsc-lite "/sbin/pcscd"))
                    (call-with-input-file "/run/pcscd/pcscd.pid" read)))
         (stop #~(make-kill-destructor)))))))
-- 
2.31.1





Information forwarded to guix-patches <at> gnu.org:
bug#48987; Package guix-patches. (Wed, 16 Jun 2021 20:55:01 GMT) Full text and rfc822 format available.

Message #8 received at 48987 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Brice Waegeneire <brice <at> waegenei.re>
Cc: 48987 <at> debbugs.gnu.org
Subject: Re: bug#48987: [PATCH] services: pcscd: Cleanup socket when started.
Date: Wed, 16 Jun 2021 22:54:01 +0200
Hi,

Brice Waegeneire <brice <at> waegenei.re> skribis:

> Otherwise when pcscd doesn't terminate properly (ie. receive a SIGKILL),
> it won't start again because of it's socket already existing.
>
> * gnu/services/security-token.scm (pcscd-shepherd-service)[start]:
> Remove existing socket file.

LGTM, thanks!

Ludo’.




Reply sent to Brice Waegeneire <brice <at> waegenei.re>:
You have taken responsibility. (Sat, 19 Jun 2021 21:52:01 GMT) Full text and rfc822 format available.

Notification sent to Brice Waegeneire <brice <at> waegenei.re>:
bug acknowledged by developer. (Sat, 19 Jun 2021 21:52:01 GMT) Full text and rfc822 format available.

Message #13 received at 48987-done <at> debbugs.gnu.org (full text, mbox):

From: Brice Waegeneire <brice <at> waegenei.re>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 48987-done <at> debbugs.gnu.org
Subject: Re: bug#48987: [PATCH] services: pcscd: Cleanup socket when started.
Date: Sat, 19 Jun 2021 23:50:58 +0200
Ludo',

Ludovic Courtès <ludo <at> gnu.org> writes:

> Brice Waegeneire <brice <at> waegenei.re> skribis:
>
>> * gnu/services/security-token.scm (pcscd-shepherd-service)[start]:
>> Remove existing socket file.
>
> LGTM, thanks!

Pushed as 4bed8486d4c0a4ff142903b8bc1584ce84767355.

Cheers,
- Brice




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 18 Jul 2021 11:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 282 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.