aboutsummaryrefslogtreecommitdiffstats
path: root/agent/gpg-agent.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2022-09-07 09:53:32 +0000
committerWerner Koch <[email protected]>2022-09-07 09:54:23 +0000
commitabf7d3c54546d4200eb88924beefc4d6b0f2dc90 (patch)
tree6cefe5d9943e272d58ad6e3da4500f7b8d2c5a3d /agent/gpg-agent.c
parentgpg: Support key flags for RENC, TIME, and GROUP. (diff)
downloadgnupg-abf7d3c54546d4200eb88924beefc4d6b0f2dc90.tar.gz
gnupg-abf7d3c54546d4200eb88924beefc4d6b0f2dc90.zip
agent: Don't start in --supervised mode if no-autostart is enabled.
* agent/gpg-agent.c (main): Print an error message if no-autostart is set in common.conf.
Diffstat (limited to 'agent/gpg-agent.c')
-rw-r--r--agent/gpg-agent.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c
index 7194e020a..fad2a363e 100644
--- a/agent/gpg-agent.c
+++ b/agent/gpg-agent.c
@@ -1517,6 +1517,17 @@ main (int argc, char **argv)
agent_deinit_default_ctrl (ctrl);
xfree (ctrl);
}
+ else if (is_supervised && comopt.no_autostart)
+ {
+ /* If we are running on a server and the user has set
+ * no-autostart for gpg or gpgsm. gpg-agent would anyway be
+ * started by the supervisor which has the bad effect that it
+ * will steal the socket from a remote server. Note that
+ * systemd has no knowledge about the lock files we take during
+ * the start operation. */
+ log_info ("%s %s not starting in supervised mode due to no-autostart.\n",
+ gpgrt_strusage(11), gpgrt_strusage(13) );
+ }
else if (is_supervised)
{
#ifndef HAVE_W32_SYSTEM