aboutsummaryrefslogtreecommitdiffstats
path: root/agent/gpg-agent.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2023-12-20 07:13:49 +0000
committerNIIBE Yutaka <[email protected]>2023-12-20 07:13:49 +0000
commit4dd4e9d2f1ac0d2a2add41e0e7ad2b328c117d55 (patch)
treee7ff70b37ed687b78125d9abc5097d46bf8a9325 /agent/gpg-agent.c
parentscd: Debug output is only enabled with an option. (diff)
downloadgnupg-4dd4e9d2f1ac0d2a2add41e0e7ad2b328c117d55.tar.gz
gnupg-4dd4e9d2f1ac0d2a2add41e0e7ad2b328c117d55.zip
agent: Fix homedir check wrt --disable-check-own-socket option.
* agent/gpg-agent.c (handle_connections): Don't disable use of inotify when it has the --disable-check-own-socket option. -- Before the fix, it checks the homedir using the gnupg_stat function when --disable-check-own-socket is enabled, without trying use of inotify. Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'agent/gpg-agent.c')
-rw-r--r--agent/gpg-agent.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c
index b7863cbbe..185957a0f 100644
--- a/agent/gpg-agent.c
+++ b/agent/gpg-agent.c
@@ -345,7 +345,7 @@ static struct debug_flags_s debug_flags [] =
* in standard socket mode. If that value is 0 we don't check at all.
* Values is in seconds. */
#define CHECK_OWN_SOCKET_INTERVAL (60)
-/* CHECK_PROBLEMS_INTERFAL defines how often we check the existence of
+/* CHECK_PROBLEMS_INTERVAL defines how often we check the existence of
* parent process and homedir. Value is in seconds. */
#define CHECK_PROBLEMS_INTERVAL (4)
@@ -3042,10 +3042,8 @@ handle_connections (gnupg_fd_t listen_fd,
gpg_strerror (err));
}
- if (disable_check_own_socket)
- home_inotify_fd = -1;
- else if ((err = gnupg_inotify_watch_delete_self (&home_inotify_fd,
- gnupg_homedir ())))
+ if ((err = gnupg_inotify_watch_delete_self (&home_inotify_fd,
+ gnupg_homedir ())))
{
if (gpg_err_code (err) != GPG_ERR_NOT_SUPPORTED)
log_info ("error enabling daemon termination by homedir removal: %s\n",