You are not logged in.

#1 2012-08-02 12:28:05

Clueless
Member
Registered: 2011-08-17
Posts: 16

gpg-agent is mysteriously started by systemd

So I recently switched from initscripts to systemd. Now when I use SSH, gpg-agent tries to save my passwords, but I can't figure out how it got started.

It's definitely running, started by systemd (or at least, orphaned such that it is parented on systemd):

$ ps aux | grep gpg-agent
aogier     405  0.0  0.1   5436  1352 ?        Ss   07:30   0:00 /usr/bin/gpg-agent --sh --daemon --enable-ssh-support --write-env-file /home/aogier/.cache/gpg-agent-info
$ pstree
systemd─┬─...
        ├─gpg-agent───scdaemon
        ├─...

But I can't find out why systemd feels the need to start it, the following all turn up empty:

$ systemctl list-units --all | grep gpg
$ systemctl list-unit-files --all | grep gpg
$ grep gpg -r /etc/systemd
$ grep gpg -r /usr/lib/systemd

My guess is something is starting gpg-agent and orphaning it, but why it's started in daemon mode with ssh support is beyond me. It gets in the way of my ssh-agent usage, and it disturbs me (a week ago I removed a SSH private key from my computer, only to find today that I could still authenticate using it because gnupg held onto it -- ick).

Anyone know what the problem could be? Maybe XFCE or LXDM?

Offline

#2 2012-08-03 02:03:42

anrxc
Member
From: Croatia
Registered: 2008-03-22
Posts: 834
Website

Re: gpg-agent is mysteriously started by systemd

It's disturbing systemd knows 'what's good for you', but gpg-agent SSH emulation is seriously broken, keys get corrupted, new keys fail to get added etc. I'm trying to get it fixed since 2010 without any progress https://bugs.g10code.com/gnupg/issue1293i


You need to install an RTFM interface.

Offline

#3 2012-12-05 13:09:00

lordheavy
Developer
From: France
Registered: 2010-04-01
Posts: 292

Re: gpg-agent is mysteriously started by systemd

Clueless wrote:

So I recently switched from initscripts to systemd. Now when I use SSH, gpg-agent tries to save my passwords, but I can't figure out how it got started.

It's definitely running, started by systemd (or at least, orphaned such that it is parented on systemd):

$ ps aux | grep gpg-agent
aogier     405  0.0  0.1   5436  1352 ?        Ss   07:30   0:00 /usr/bin/gpg-agent --sh --daemon --enable-ssh-support --write-env-file /home/aogier/.cache/gpg-agent-info
$ pstree
systemd─┬─...
        ├─gpg-agent───scdaemon
        ├─...

But I can't find out why systemd feels the need to start it, the following all turn up empty:

$ systemctl list-units --all | grep gpg
$ systemctl list-unit-files --all | grep gpg
$ grep gpg -r /etc/systemd
$ grep gpg -r /usr/lib/systemd

My guess is something is starting gpg-agent and orphaning it, but why it's started in daemon mode with ssh support is beyond me. It gets in the way of my ssh-agent usage, and it disturbs me (a week ago I removed a SSH private key from my computer, only to find today that I could still authenticate using it because gnupg held onto it -- ick).

Anyone know what the problem could be? Maybe XFCE or LXDM?

Have you check if it's not started in /etc/profile.d/ ?

Offline

#4 2012-12-05 13:17:42

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: gpg-agent is mysteriously started by systemd

It's more likely that something such as gnome-keyring-daemon is starting this for you. gpg-agent is completely evil, and yes, it double forks on startup (so regardless of what starts it, it will always end up reparented to PID 1). systemd isn't involved here. you might want to change your post title.

Offline

#5 2013-02-21 15:20:59

corro
Member
Registered: 2013-02-21
Posts: 1

Re: gpg-agent is mysteriously started by systemd

I was wondering what starts the gpg-agent too and found that in my case it's XFCE. See the XFCE docs. It also states how to disable this "feature".

Offline

Board footer

Powered by FluxBB