Home GnuPG
Diffusion GnuPG 9f92b62a51d2

agent: Implement --supervised command (for systemd, etc).
9f92b62a51d2Unpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

agent: Implement --supervised command (for systemd, etc).

* agent/gpg-agent.c (get_socket_path): New function for POSIX systems
to return the path for a provided unix-domain socket.
(map_supervised_sockets): New function to inspect $LISTEN_FDS and
$LISTEN_FDNAMES and map them to the specific functionality offered by
the agent.
(main): Add --supervised command.  When used, listen on already-open
file descriptors instead of opening our own.
* doc/gpg-agent.texi: Document --supervised option.

"gpg-agent --supervised" is a way to invoke gpg-agent such that a
system supervisor like systemd can provide socket-activated startup,
log management, and scheduled shutdown.

When running in this mode, gpg-agent:

  • Does not open its own listening socket; rather, it expects to be given a listening socket on incoming file descriptors.
  • Does not detach from the invoking process, staying in the foreground instead. Unless otherwise specified, logs are sent to stderr.
  • Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>

Details

Provenance
dkgAuthored on Aug 12 2016, 7:37 AM
wernerCommitted on Oct 4 2016, 5:11 PM
Parents
rG4a232d23a8f5: build,w32: Unconditionally build tests.
Branches
Unknown
Tags
Unknown

Event Timeline

Werner Koch <wk@gnupg.org> committed rG9f92b62a51d2: agent: Implement --supervised command (for systemd, etc). (authored by Daniel Kahn Gillmor <dkg@fifthhorseman.net>).Oct 4 2016, 5:11 PM