mirror of
git://git.gnupg.org/gnupg.git
synced 2024-09-20 14:51:42 +02:00
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 <gniibe@fsij.org>
This commit is contained in:
parent
4e94b004a6
commit
4dd4e9d2f1
@ -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.
|
* in standard socket mode. If that value is 0 we don't check at all.
|
||||||
* Values is in seconds. */
|
* Values is in seconds. */
|
||||||
#define CHECK_OWN_SOCKET_INTERVAL (60)
|
#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. */
|
* parent process and homedir. Value is in seconds. */
|
||||||
#define CHECK_PROBLEMS_INTERVAL (4)
|
#define CHECK_PROBLEMS_INTERVAL (4)
|
||||||
|
|
||||||
@ -3042,9 +3042,7 @@ handle_connections (gnupg_fd_t listen_fd,
|
|||||||
gpg_strerror (err));
|
gpg_strerror (err));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (disable_check_own_socket)
|
if ((err = gnupg_inotify_watch_delete_self (&home_inotify_fd,
|
||||||
home_inotify_fd = -1;
|
|
||||||
else if ((err = gnupg_inotify_watch_delete_self (&home_inotify_fd,
|
|
||||||
gnupg_homedir ())))
|
gnupg_homedir ())))
|
||||||
{
|
{
|
||||||
if (gpg_err_code (err) != GPG_ERR_NOT_SUPPORTED)
|
if (gpg_err_code (err) != GPG_ERR_NOT_SUPPORTED)
|
||||||
|
Loading…
Reference in New Issue
Block a user