After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 585535 - seahorse-agent should copy skeleton gpg.conf instead of creating empty one
seahorse-agent should copy skeleton gpg.conf instead of creating empty one
Status: RESOLVED WONTFIX
Product: seahorse-plugins
Classification: Applications
Component: Agent
2.27.x
Other All
: Normal normal
: 2.24
Assigned To: seahorse-plugins-maint
seahorse-plugins-maint
gnome[unmaintained]
Depends on:
Blocks:
 
 
Reported: 2009-06-12 09:16 UTC by Andreas Moog
Modified: 2020-06-06 08:52 UTC
See Also:
GNOME target: ---
GNOME version: 2.27/2.28


Attachments
patch fixing the issue (1.25 KB, patch)
2009-06-12 09:17 UTC, Andreas Moog
needs-work Details | Review

Description Andreas Moog 2009-06-12 09:16:48 UTC
Please describe the problem:
Reported on Launchpad: https://bugs.edge.launchpad.net/bugs/345727

"When gpg is first run, it's supposed to copy /usr/share/gnupg/options.skel into ~/.gnupg/gpg.conf however seahorse-agent is part of the default ubuntu-desktop session. Seahorse-agent writes an empty file there on its first run. This means "use-agent" isn't in there. If the user then installs kubuntu-desktop, seahorse-agent will still run instead of gpg-agent.

Net effect, if the following sequence of events occurs:
1. User installs Ubuntu
2. User logs into a GNOME session in Ubuntu
3. User installs kubuntu-desktop
4. User logs into KDE and uses KMail

The result is:
seahorse-agent (which is not compatible with KMail) runs instead of gpg-agent (which is compatible)
KMail hangs when told to sign an email, finally throwing an error saying it couldn't get the passphrase

This is fixed by having use-agent in ~/.gnupg/gpg.conf...in other words, by having the skeleton file there instead of an empty file. If this is the case, seahorse-agent still runs in GNOME but gpg-agent runs in KDE, allowing KMail to function properly."

Attached patch from Mackenzie Morgan fixes that.

Steps to reproduce:


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Andreas Moog 2009-06-12 09:17:17 UTC
Created attachment 136406 [details] [review]
patch fixing the issue
Comment 2 Adam Schreiber 2009-06-12 14:43:13 UTC
Andreas, Do you know if the file location is Ubuntu specific or not?  The file should get changed, but we need to know if it's in the same place on other distros.

The patch should keep the assert checking of err and probably doesn't need to read in the contents first since if the file exists the find_config function would have already returned and g_file_set_contents would over write it anyway.
Comment 3 nobled 2009-12-16 14:53:23 UTC
If we use gpgconf[1], that can take care of setting the defaults automatically, and Seahorse doesn't have to worry where the skeleton file comes from.

[1] http://www.gnupg.org/documentation/manuals/gnupg/gpgconf.html

In Debian at least, gpgconf is in the gnupg2 package.
Comment 4 Adam Schreiber 2010-01-02 23:00:35 UTC
I think we just need to add some extra checks before genning our defualt config.

Something like 

1. Check for gpgconf
2. Check for gpgconf.skel
3. Create seahorse default
Comment 5 André Klapper 2020-06-06 08:52:19 UTC
seahorse-plugins is not under active development anymore:
https://gitlab.gnome.org/Infrastructure/Infrastructure/issues/257

It had its last code changes many years ago:
https://gitlab.gnome.org/GNOME/seahorse-plugins/-/commits/master

Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect
reality. Please feel free to reopen this ticket (or rather transfer the project
to GNOME Gitlab, as GNOME Bugzilla is deprecated) if anyone takes the
responsibility for active development again.