GNU bug report logs - #24076
gnupg [-agent]: when signing [commits], it claims that there is no pinentry - but there is

Previous Next

Package: guix;

Reported by: Danny Milosavljevic <dannym <at> scratchpost.org>

Date: Tue, 26 Jul 2016 16:06:02 UTC

Severity: important

Merged with 36784, 37266

Done: Leo Famulari <leo <at> famulari.name>

Bug is archived. No further changes may be made.

Full log


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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Leo Famulari <leo <at> famulari.name>
Cc: 24076 <at> debbugs.gnu.org
Subject: Re: bug#24076: [PATCH] gnu: GnuPG: Really use
 ~/.guix-profile/bin/pinentry by default.
Date: Sun, 29 Mar 2020 16:57:33 +0200
Hi Leo!

Leo Famulari <leo <at> famulari.name> skribis:

> This is a followup to commit c7af9d0b5ebaa1fdb08ff5d8a56004998bcd8103.
>
> This patch does as expected for me! But it's been some years since I
> wrote C code, so I copy existing functions and fought through compiler
> errors to write this — please give a close review.
>
> * gnu/packages/patches/gnupg-default-pinentry.patch: Use $HOME to find
> the user's Guix profile and installed pinentry.

Thanks for fixing it, and apologies for the mistake!

> ++/* Return the user's home directory */
> ++const char *
> ++user_homedir (void)
> ++{
> ++  const char *dir;
> ++  dir = getenv("HOME");

Here I’d add:

  if (dir == NULL)
    {
       struct password *pw;
       pw = getpwuid (getuid ());
       if (pw != NULL)
         dir = pw->pw_dir;
       else
         dir = "/";
    }

Otherwise LGTM!

Ludo’.




This bug report was last modified 4 years and 30 days ago.

Previous Next


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