bisson (Gaetan Bisson)
User

Projects

User does not belong to any projects.

Today

  • Clear sailing ahead.

Tomorrow

  • Clear sailing ahead.

Friday

  • Clear sailing ahead.

User Details

User Since
Mar 27 2017, 4:47 PM (137 w, 2 d)
Availability
Available

Recent Activity

Oct 1 2019

bisson added a comment to T4714: Gnupg can't import or generate private key as root.

I believe the issue is as follows. When given the option ttyname=... pinentry will open() the given tty and that fails since it is owned by the regular user and not root; strace reports:

openat(AT_FDCWD, "/dev/pts/1", O_RDONLY) = -1 EACCES (Permission denied)

However, when not given this option, pinentry will simply write() to stdout which causes no permission problem; through sudo and the terminal this goes to /dev/pts/1.

Oct 1 2019, 9:54 PM · Bug Report
bisson added a comment to T4714: Gnupg can't import or generate private key as root.

I found a way to replicate that error with just pinentry by doing (as root):

# tty
/dev/pts/1
# pinentry
OK Pleased to meet you
OPTION ttyname=/dev/pts/1
OK
GETPIN
S ERROR gtk2.open_tty_for_read 83918849
ERR 83918849 Permission denied <Pinentry>

When I remove OPTION ttyname=... there is no error.

Oct 1 2019, 9:42 PM · Bug Report
bisson added a comment to T4714: Gnupg can't import or generate private key as root.

My other terminals (xterm) are /dev/pts/1, /dev/pts/2, etc. and I can reproduce the bug in them too.

Oct 1 2019, 8:46 PM · Bug Report
bisson added a comment to T4714: Gnupg can't import or generate private key as root.

I did not (neither in my root shell nor in my user shell) but setting and exporting this environment variable does not make any difference: gpg --gen-key still fails as above. (Note that tty indeed returns /dev/pts/0 .)

Oct 1 2019, 10:41 AM · Bug Report

Sep 30 2019

bisson added a comment to T4714: Gnupg can't import or generate private key as root.

Thanks for your help investigating this.

Sep 30 2019, 11:12 PM · Bug Report
bisson added a comment to T4714: Gnupg can't import or generate private key as root.

What is weird is that pinentry supposedly detects the absence of an X session and falls back on curses. For instance, I have:

Sep 30 2019, 8:49 PM · Bug Report

May 12 2015

bisson added a comment to T1762: gpg --homedir as root fails to convert old keyrings.

This seems to work with gnupg-2.1.4. Thanks!

May 12 2015, 4:12 PM · Bug Report, gnupg, Keyserver, Arch

Nov 18 2014

bisson set External Link to https://bugs.archlinux.org/task/42798 on T1762: gpg --homedir as root fails to convert old keyrings.
Nov 18 2014, 4:42 AM · Bug Report, gnupg, Keyserver, Arch
bisson set Version to 2.1 on T1762: gpg --homedir as root fails to convert old keyrings.
Nov 18 2014, 4:42 AM · Bug Report, gnupg, Keyserver, Arch
bisson added projects to T1762: gpg --homedir as root fails to convert old keyrings: Arch, gnupg, Bug Report.
Nov 18 2014, 4:42 AM · Bug Report, gnupg, Keyserver, Arch