[Pkg-gnupg-commit] [gnupg2] 182/185: refresh patches
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Mon Aug 7 11:55:40 UTC 2017
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch experimental
in repository gnupg2.
commit e8e3708e97b5477fefc11ebecc3515390549427a
Author: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date: Mon Aug 7 00:56:30 2017 -0400
refresh patches
---
...0003-Avoid-simple-memory-dumps-via-ptrace.patch | 8 +--
...regenerating-defsincdate-use-shipped-file.patch | 2 +-
...-Avoid-potential-race-condition-when-some.patch | 20 ++++---
...5-dirmngr-Avoid-need-for-hkp-housekeeping.patch | 67 +++++++++++-----------
...void-automatically-checking-upstream-swdb.patch | 10 ++--
.../0007-dirmngr-Drop-useless-housekeeping.patch | 50 ++++++++++------
...gent-Create-framework-of-scheduled-timers.patch | 36 ++++++------
...-threads-to-interrupt-main-select-loop-wi.patch | 20 +++----
...gent-Avoid-tight-timer-tick-when-possible.patch | 12 ++--
...-scheduled-checks-on-socket-when-inotify-.patch | 6 +-
...gning-keys-where-no-secret-key-is-availab.patch | 4 +-
11 files changed, 127 insertions(+), 108 deletions(-)
diff --git a/debian/patches/block-ptrace-on-agent/0003-Avoid-simple-memory-dumps-via-ptrace.patch b/debian/patches/block-ptrace-on-agent/0003-Avoid-simple-memory-dumps-via-ptrace.patch
index db44ad5..353c82f 100644
--- a/debian/patches/block-ptrace-on-agent/0003-Avoid-simple-memory-dumps-via-ptrace.patch
+++ b/debian/patches/block-ptrace-on-agent/0003-Avoid-simple-memory-dumps-via-ptrace.patch
@@ -21,7 +21,7 @@ Upstream bug: https://dev.gnupg.org/T1211
2 files changed, 9 insertions(+)
diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c
-index c764be8..43ca673 100644
+index 603f707..1dfbd84 100644
--- a/agent/gpg-agent.c
+++ b/agent/gpg-agent.c
@@ -48,6 +48,9 @@
@@ -34,7 +34,7 @@ index c764be8..43ca673 100644
#define GNUPG_COMMON_NEED_AFLOCAL
#include "agent.h"
-@@ -956,6 +959,11 @@ main (int argc, char **argv )
+@@ -979,6 +982,11 @@ main (int argc, char **argv )
early_system_init ();
@@ -47,10 +47,10 @@ index c764be8..43ca673 100644
file descriptors and the signal mask. This info is required to
do the exec call properly. We don't need it on Windows. */
diff --git a/configure.ac b/configure.ac
-index 9395fb8..4e4272e 100644
+index 764a62d..c18e9ad 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -1356,6 +1356,7 @@ AC_CHECK_FUNCS([strerror strlwr tcgetattr mmap canonicalize_file_name])
+@@ -1359,6 +1359,7 @@ AC_CHECK_FUNCS([strerror strlwr tcgetattr mmap canonicalize_file_name])
AC_CHECK_FUNCS([strcasecmp strncasecmp ctermid times gmtime_r strtoull])
AC_CHECK_FUNCS([setenv unsetenv fcntl ftruncate inet_ntop])
AC_CHECK_FUNCS([canonicalize_file_name])
diff --git a/debian/patches/debian-packaging/0002-avoid-regenerating-defsincdate-use-shipped-file.patch b/debian/patches/debian-packaging/0002-avoid-regenerating-defsincdate-use-shipped-file.patch
index 53a81c1..a9ef89d 100644
--- a/debian/patches/debian-packaging/0002-avoid-regenerating-defsincdate-use-shipped-file.patch
+++ b/debian/patches/debian-packaging/0002-avoid-regenerating-defsincdate-use-shipped-file.patch
@@ -18,7 +18,7 @@ the datestamp unreproducible.
1 file changed, 7 deletions(-)
diff --git a/doc/Makefile.am b/doc/Makefile.am
-index 0c78284..9815096 100644
+index 89079b3..33b803b 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -168,13 +168,6 @@ $(myman_pages) gnupg.7 : yat2m-stamp defs.inc
diff --git a/debian/patches/dirmngr-idling/0004-dirmngr-hkp-Avoid-potential-race-condition-when-some.patch b/debian/patches/dirmngr-idling/0004-dirmngr-hkp-Avoid-potential-race-condition-when-some.patch
index a8cac15..966d2e3 100644
--- a/debian/patches/dirmngr-idling/0004-dirmngr-hkp-Avoid-potential-race-condition-when-some.patch
+++ b/debian/patches/dirmngr-idling/0004-dirmngr-hkp-Avoid-potential-race-condition-when-some.patch
@@ -32,16 +32,16 @@ what might not.
Signed-off-by: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
---
- dirmngr/ks-engine-hkp.c | 21 ++++++++++-----------
- 1 file changed, 10 insertions(+), 11 deletions(-)
+ dirmngr/ks-engine-hkp.c | 23 ++++++++++-------------
+ 1 file changed, 10 insertions(+), 13 deletions(-)
diff --git a/dirmngr/ks-engine-hkp.c b/dirmngr/ks-engine-hkp.c
-index ddb8549..2937b00 100644
+index 4a0b08f..5e1d6c0 100644
--- a/dirmngr/ks-engine-hkp.c
+++ b/dirmngr/ks-engine-hkp.c
-@@ -206,25 +206,24 @@ host_in_pool_p (int *pool, int tblidx)
+@@ -221,29 +221,26 @@ host_in_pool_p (hostinfo_t hi, int tblidx)
static int
- select_random_host (int *table)
+ select_random_host (hostinfo_t hi)
{
- int *tbl;
- size_t tblsize;
@@ -51,8 +51,10 @@ index ddb8549..2937b00 100644
/* We create a new table so that we randomly select only from
currently alive hosts. */
-- for (idx=0, tblsize=0; (pidx = table[idx]) != -1; idx++)
-+ for (idx=0; (pidx = table[idx]) != -1; idx++)
+- for (idx = 0, tblsize = 0;
++ for (idx = 0;
+ idx < hi->pool_len && (pidx = hi->pool[idx]) != -1;
+ idx++)
if (hosttable[pidx] && !hosttable[pidx]->dead)
- tblsize++;
+ {
@@ -68,7 +70,9 @@ index ddb8549..2937b00 100644
- tbl = xtrymalloc (tblsize * sizeof *tbl);
- if (!tbl)
- return -1;
-- for (idx=0, tblsize=0; (pidx = table[idx]) != -1; idx++)
+- for (idx = 0, tblsize = 0;
+- idx < hi->pool_len && (pidx = hi->pool[idx]) != -1;
+- idx++)
- if (hosttable[pidx] && !hosttable[pidx]->dead)
- tbl[tblsize++] = pidx;
-
diff --git a/debian/patches/dirmngr-idling/0005-dirmngr-Avoid-need-for-hkp-housekeeping.patch b/debian/patches/dirmngr-idling/0005-dirmngr-Avoid-need-for-hkp-housekeeping.patch
index 47f7686..b699d7c 100644
--- a/debian/patches/dirmngr-idling/0005-dirmngr-Avoid-need-for-hkp-housekeeping.patch
+++ b/debian/patches/dirmngr-idling/0005-dirmngr-Avoid-need-for-hkp-housekeeping.patch
@@ -20,16 +20,16 @@ HOUSEKEEPING_INTERVAL seconds.
Signed-off-by: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
---
- dirmngr/dirmngr.c | 3 --
+ dirmngr/dirmngr.c | 3 ---
dirmngr/dirmngr.h | 1 -
- dirmngr/ks-engine-hkp.c | 73 ++++++++++++++++++++++++-------------------------
- 3 files changed, 36 insertions(+), 41 deletions(-)
+ dirmngr/ks-engine-hkp.c | 72 ++++++++++++++++++++++++-------------------------
+ 3 files changed, 35 insertions(+), 41 deletions(-)
diff --git a/dirmngr/dirmngr.c b/dirmngr/dirmngr.c
-index 8393e0b..8ab4a89 100644
+index 0d133c6..67d6cbd 100644
--- a/dirmngr/dirmngr.c
+++ b/dirmngr/dirmngr.c
-@@ -1861,12 +1861,10 @@ static void *
+@@ -1912,12 +1912,10 @@ static void *
housekeeping_thread (void *arg)
{
static int sentinel;
@@ -42,7 +42,7 @@ index 8393e0b..8ab4a89 100644
if (sentinel)
{
log_info ("housekeeping is already going on\n");
-@@ -1879,7 +1877,6 @@ housekeeping_thread (void *arg)
+@@ -1930,7 +1928,6 @@ housekeeping_thread (void *arg)
memset (&ctrlbuf, 0, sizeof ctrlbuf);
dirmngr_init_default_ctrl (&ctrlbuf);
@@ -51,10 +51,10 @@ index 8393e0b..8ab4a89 100644
{
network_activity_seen = 0;
diff --git a/dirmngr/dirmngr.h b/dirmngr/dirmngr.h
-index e10de09..e9be4fb 100644
+index 1f660de..bd0b06c 100644
--- a/dirmngr/dirmngr.h
+++ b/dirmngr/dirmngr.h
-@@ -207,7 +207,6 @@ const char* dirmngr_get_current_socket_name (void);
+@@ -213,7 +213,6 @@ const char* dirmngr_get_current_socket_name (void);
int dirmngr_use_tor (void);
/*-- Various housekeeping functions. --*/
@@ -63,13 +63,13 @@ index e10de09..e9be4fb 100644
diff --git a/dirmngr/ks-engine-hkp.c b/dirmngr/ks-engine-hkp.c
-index 2937b00..9aca2b7 100644
+index 5e1d6c0..8419af1 100644
--- a/dirmngr/ks-engine-hkp.c
+++ b/dirmngr/ks-engine-hkp.c
-@@ -200,6 +200,25 @@ host_in_pool_p (int *pool, int tblidx)
+@@ -214,6 +214,24 @@ host_in_pool_p (hostinfo_t hi, int tblidx)
+ return 0;
}
-
+static int
+host_is_alive (hostinfo_t hi, time_t curtime)
+{
@@ -88,11 +88,10 @@ index 2937b00..9aca2b7 100644
+ }
+ return 0;
+}
-+
- /* Select a random host. Consult TABLE which indices into the global
- hosttable. Returns index into TABLE or -1 if no host could be
- selected. */
-@@ -209,11 +228,13 @@ select_random_host (int *table)
+
+ /* Select a random host. Consult HI->pool which indices into the global
+ hosttable. Returns index into HI->pool or -1 if no host could be
+@@ -224,13 +242,15 @@ select_random_host (hostinfo_t hi)
int *tbl = NULL;
size_t tblsize = 0;
int pidx, idx;
@@ -101,29 +100,31 @@ index 2937b00..9aca2b7 100644
+ curtime = gnupg_get_time ();
/* We create a new table so that we randomly select only from
currently alive hosts. */
- for (idx=0; (pidx = table[idx]) != -1; idx++)
+ for (idx = 0;
+ idx < hi->pool_len && (pidx = hi->pool[idx]) != -1;
+ idx++)
- if (hosttable[pidx] && !hosttable[pidx]->dead)
+ if (hosttable[pidx] && host_is_alive (hosttable[pidx], curtime))
{
tblsize++;
tbl = xtryrealloc(tbl, tblsize * sizeof *tbl);
-@@ -398,6 +419,7 @@ map_host (ctrl_t ctrl, const char *name, const char *srvtag, int force_reselect,
- gpg_error_t err = 0;
- hostinfo_t hi;
- int idx;
+@@ -458,6 +478,7 @@ map_host (ctrl_t ctrl, const char *name, const char *srvtag, int force_reselect,
+ int is_pool;
+ int new_hosts = 0;
+ char *cname;
+ time_t curtime;
*r_host = NULL;
if (r_httpflags)
-@@ -540,6 +562,7 @@ map_host (ctrl_t ctrl, const char *name, const char *srvtag, int force_reselect,
- xfree (reftbl);
+@@ -484,6 +505,7 @@ map_host (ctrl_t ctrl, const char *name, const char *srvtag, int force_reselect,
}
-
+ else
+ hi = hosttable[idx];
+ curtime = gnupg_get_time ();
- hi = hosttable[idx];
- if (hi->pool)
- {
-@@ -556,7 +579,7 @@ map_host (ctrl_t ctrl, const char *name, const char *srvtag, int force_reselect,
+
+ is_pool = hi->pool != NULL;
+
+@@ -590,7 +612,7 @@ map_host (ctrl_t ctrl, const char *name, const char *srvtag, int force_reselect,
if (force_reselect)
hi->poolidx = -1;
else if (hi->poolidx >= 0 && hi->poolidx < hosttable_size
@@ -132,7 +133,7 @@ index 2937b00..9aca2b7 100644
hi->poolidx = -1;
/* Select a host if needed. */
-@@ -609,7 +632,7 @@ map_host (ctrl_t ctrl, const char *name, const char *srvtag, int force_reselect,
+@@ -642,7 +664,7 @@ map_host (ctrl_t ctrl, const char *name, const char *srvtag, int force_reselect,
free_dns_addrinfo (aibuf);
}
@@ -141,7 +142,7 @@ index 2937b00..9aca2b7 100644
{
log_error ("host '%s' marked as dead\n", hi->name);
if (r_httphost)
-@@ -714,7 +737,8 @@ ks_hkp_mark_host (ctrl_t ctrl, const char *name, int alive)
+@@ -747,7 +769,8 @@ ks_hkp_mark_host (ctrl_t ctrl, const char *name, int alive)
{
gpg_error_t err = 0;
hostinfo_t hi, hi2;
@@ -151,7 +152,7 @@ index 2937b00..9aca2b7 100644
if (!name || !*name || !strcmp (name, "localhost"))
return 0;
-@@ -723,13 +747,15 @@ ks_hkp_mark_host (ctrl_t ctrl, const char *name, int alive)
+@@ -756,13 +779,15 @@ ks_hkp_mark_host (ctrl_t ctrl, const char *name, int alive)
if (idx == -1)
return gpg_error (GPG_ERR_NOT_FOUND);
@@ -169,7 +170,7 @@ index 2937b00..9aca2b7 100644
{
hi->dead = 1;
hi->died_at = 0; /* Manually set dead. */
-@@ -761,14 +787,15 @@ ks_hkp_mark_host (ctrl_t ctrl, const char *name, int alive)
+@@ -796,14 +821,15 @@ ks_hkp_mark_host (ctrl_t ctrl, const char *name, int alive)
hi2 = hosttable[n];
if (!hi2)
@@ -188,7 +189,7 @@ index 2937b00..9aca2b7 100644
{
hi2->dead = 1;
hi2->died_at = 0; /* Manually set dead. */
-@@ -1051,34 +1078,6 @@ ks_hkp_resolve (ctrl_t ctrl, parsed_uri_t uri)
+@@ -1089,34 +1115,6 @@ ks_hkp_resolve (ctrl_t ctrl, parsed_uri_t uri)
}
diff --git a/debian/patches/dirmngr-idling/0006-dirmngr-Avoid-automatically-checking-upstream-swdb.patch b/debian/patches/dirmngr-idling/0006-dirmngr-Avoid-automatically-checking-upstream-swdb.patch
index 78f3d36..ae0f739 100644
--- a/debian/patches/dirmngr-idling/0006-dirmngr-Avoid-automatically-checking-upstream-swdb.patch
+++ b/debian/patches/dirmngr-idling/0006-dirmngr-Avoid-automatically-checking-upstream-swdb.patch
@@ -15,10 +15,10 @@ Signed-off-by: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
2 files changed, 4 insertions(+), 16 deletions(-)
diff --git a/dirmngr/dirmngr.c b/dirmngr/dirmngr.c
-index 8ab4a89..fee1b61 100644
+index 67d6cbd..cde6071 100644
--- a/dirmngr/dirmngr.c
+++ b/dirmngr/dirmngr.c
-@@ -1861,7 +1861,6 @@ static void *
+@@ -1912,7 +1912,6 @@ static void *
housekeeping_thread (void *arg)
{
static int sentinel;
@@ -26,7 +26,7 @@ index 8ab4a89..fee1b61 100644
(void)arg;
-@@ -1874,18 +1873,6 @@ housekeeping_thread (void *arg)
+@@ -1925,18 +1924,6 @@ housekeeping_thread (void *arg)
if (opt.verbose > 1)
log_info ("starting housekeeping\n");
@@ -46,10 +46,10 @@ index 8ab4a89..fee1b61 100644
log_info ("ready with housekeeping\n");
sentinel--;
diff --git a/doc/dirmngr.texi b/doc/dirmngr.texi
-index 22a7943..23442b4 100644
+index eef78a8..8030fd0 100644
--- a/doc/dirmngr.texi
+++ b/doc/dirmngr.texi
-@@ -266,9 +266,10 @@ seconds.
+@@ -285,9 +285,10 @@ connect all addresses listed for a server.
@item --allow-version-check
@opindex allow-version-check
Allow Dirmngr to connect to @code{https://versions.gnupg.org} to get
diff --git a/debian/patches/dirmngr-idling/0007-dirmngr-Drop-useless-housekeeping.patch b/debian/patches/dirmngr-idling/0007-dirmngr-Drop-useless-housekeeping.patch
index de04a75..1f4bda5 100644
--- a/debian/patches/dirmngr-idling/0007-dirmngr-Drop-useless-housekeeping.patch
+++ b/debian/patches/dirmngr-idling/0007-dirmngr-Drop-useless-housekeeping.patch
@@ -15,19 +15,20 @@ and the runtime is more efficient if we drop this.
Signed-off-by: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
---
- dirmngr/dirmngr.c | 113 +++---------------------------------------------------
- 1 file changed, 5 insertions(+), 108 deletions(-)
+ dirmngr/dirmngr.c | 127 +++---------------------------------------------------
+ 1 file changed, 6 insertions(+), 121 deletions(-)
diff --git a/dirmngr/dirmngr.c b/dirmngr/dirmngr.c
-index fee1b61..e30c16c 100644
+index cde6071..c4b3508 100644
--- a/dirmngr/dirmngr.c
+++ b/dirmngr/dirmngr.c
-@@ -327,13 +327,6 @@ static int network_activity_seen;
+@@ -334,14 +334,6 @@ static int network_activity_seen;
static strlist_t hkp_cacert_filenames;
--/* The timer tick used for housekeeping stuff. */
--#define TIMERTICK_INTERVAL (60)
+-/* The timer tick used for housekeeping stuff. The second constant is used when a shutdown is pending. */
+-#define TIMERTICK_INTERVAL (60)
+-#define TIMERTICK_INTERVAL_SHUTDOWN (4)
-
-/* How oft to run the housekeeping. */
-#define HOUSEKEEPING_INTERVAL (600)
@@ -36,7 +37,7 @@ index fee1b61..e30c16c 100644
/* This union is used to avoid compiler warnings in case a pointer is
64 bit and an int 32 bit. We store an integer in a pointer and get
it back later (npth_getspecific et al.). */
-@@ -1856,83 +1849,6 @@ handle_signal (int signo)
+@@ -1907,93 +1899,6 @@ handle_signal (int signo)
#endif /*!HAVE_W32_SYSTEM*/
@@ -95,6 +96,8 @@ index fee1b61..e30c16c 100644
-static void
-handle_tick (void)
-{
+- struct stat statbuf;
+-
- if (time_for_housekeeping_p (gnupg_get_time ()))
- {
- npth_t thread;
@@ -114,23 +117,30 @@ index fee1b61..e30c16c 100644
- npth_attr_destroy (&tattr);
- }
- }
+-
+- /* Check whether the homedir is still available. */
+- if (!shutdown_pending
+- && stat (gnupg_homedir (), &statbuf) && errno == ENOENT)
+- {
+- shutdown_pending = 1;
+- log_info ("homedir has been removed - shutting down\n");
+- }
-}
-
-
/* Check the nonce on a new connection. This is a NOP unless we are
using our Unix domain socket emulation under Windows. */
static int
-@@ -2032,9 +1948,6 @@ handle_connections (assuan_fd_t listen_fd)
+@@ -2093,8 +1998,6 @@ handle_connections (assuan_fd_t listen_fd)
socklen_t plen = sizeof( paddr );
int nfd, ret;
fd_set fdset, read_fdset;
- struct timespec abstime;
- struct timespec curtime;
-- struct timespec timeout;
+ struct timespec timeout;
int saved_errno;
int my_inotify_fd = -1;
-
-@@ -2074,9 +1987,7 @@ handle_connections (assuan_fd_t listen_fd)
+@@ -2135,9 +2038,7 @@ handle_connections (assuan_fd_t listen_fd)
#endif /*HAVE_INOTIFY_INIT*/
@@ -141,7 +151,7 @@ index fee1b61..e30c16c 100644
FD_ZERO (&fdset);
FD_SET (FD2INT (listen_fd), &fdset);
nfd = FD2INT (listen_fd);
-@@ -2087,9 +1998,6 @@ handle_connections (assuan_fd_t listen_fd)
+@@ -2148,9 +2049,6 @@ handle_connections (assuan_fd_t listen_fd)
nfd = my_inotify_fd;
}
@@ -151,7 +161,7 @@ index fee1b61..e30c16c 100644
/* Main loop. */
for (;;)
{
-@@ -2100,7 +2008,7 @@ handle_connections (assuan_fd_t listen_fd)
+@@ -2161,7 +2059,7 @@ handle_connections (assuan_fd_t listen_fd)
break; /* ready */
/* Do not accept new connections but keep on running the
@@ -160,17 +170,20 @@ index fee1b61..e30c16c 100644
*
* Note that we do not close the listening socket because a
* client trying to connect to that socket would instead
-@@ -2120,24 +2028,14 @@ handle_connections (assuan_fd_t listen_fd)
+@@ -2181,27 +2079,14 @@ handle_connections (assuan_fd_t listen_fd)
/* Take a copy of the fdset. */
read_fdset = fdset;
- npth_clock_gettime (&curtime);
- if (!(npth_timercmp (&curtime, &abstime, <)))
- {
-- /* Timeout. */
+- /* Timeout. When a shutdown is pending we use a shorter
+- * interval to handle the shutdown more quickly. */
- handle_tick ();
- npth_clock_gettime (&abstime);
-- abstime.tv_sec += TIMERTICK_INTERVAL;
+- abstime.tv_sec += (shutdown_pending
+- ? TIMERTICK_INTERVAL_SHUTDOWN
+- : TIMERTICK_INTERVAL);
- }
- npth_timersub (&abstime, &curtime, &timeout);
-
@@ -187,13 +200,14 @@ index fee1b61..e30c16c 100644
saved_errno = errno;
#endif
-@@ -2151,8 +2049,7 @@ handle_connections (assuan_fd_t listen_fd)
+@@ -2215,8 +2100,8 @@ handle_connections (assuan_fd_t listen_fd)
if (ret <= 0)
{
- /* Interrupt or timeout. Will be handled when calculating the
- next timeout. */
-+ /* Interrupt. Will be handled at the top of the next loop. */
++ /* Interrupt. Will be handled at the top of the next
++ loop. */
continue;
}
diff --git a/debian/patches/gpg-agent-idling/0008-agent-Create-framework-of-scheduled-timers.patch b/debian/patches/gpg-agent-idling/0008-agent-Create-framework-of-scheduled-timers.patch
index c3b0a5c..ac47b55 100644
--- a/debian/patches/gpg-agent-idling/0008-agent-Create-framework-of-scheduled-timers.patch
+++ b/debian/patches/gpg-agent-idling/0008-agent-Create-framework-of-scheduled-timers.patch
@@ -27,30 +27,30 @@ any regularly-scheduled timeout.
Signed-off-by: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
---
- agent/gpg-agent.c | 86 ++++++++++++++++++++++++++++++++++++-------------------
- 1 file changed, 57 insertions(+), 29 deletions(-)
+ agent/gpg-agent.c | 84 +++++++++++++++++++++++++++++++++++++------------------
+ 1 file changed, 57 insertions(+), 27 deletions(-)
diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c
-index 43ca673..cb5a391 100644
+index 1dfbd84..a867d51 100644
--- a/agent/gpg-agent.c
+++ b/agent/gpg-agent.c
-@@ -2291,11 +2291,6 @@ create_directories (void)
+@@ -2329,12 +2329,8 @@ create_directories (void)
static void
handle_tick (void)
{
- static time_t last_minute;
--
+ struct stat statbuf;
+
- if (!last_minute)
- last_minute = time (NULL);
-
/* Check whether the scdaemon has died and cleanup in this case. */
agent_scd_check_aliveness ();
-@@ -2314,16 +2309,6 @@ handle_tick (void)
- }
+@@ -2354,15 +2350,6 @@ handle_tick (void)
}
#endif /*HAVE_W32_SYSTEM*/
--
+
- /* Code to be run from time to time. */
-#if CHECK_OWN_SOCKET_INTERVAL > 0
- if (last_minute + CHECK_OWN_SOCKET_INTERVAL <= time (NULL))
@@ -60,10 +60,10 @@ index 43ca673..cb5a391 100644
- }
-#endif
-
- }
-
-
-@@ -2720,6 +2705,15 @@ start_connection_thread_ssh (void *arg)
+ /* Check whether the homedir is still available. */
+ if (!shutdown_pending
+ && (!have_homedir_inotify || !reliable_homedir_inotify)
+@@ -2767,6 +2754,15 @@ start_connection_thread_ssh (void *arg)
}
@@ -79,7 +79,7 @@ index 43ca673..cb5a391 100644
/* Connection handler loop. Wait for connection requests and spawn a
thread after accepting a connection. */
static void
-@@ -2737,9 +2731,11 @@ handle_connections (gnupg_fd_t listen_fd,
+@@ -2784,9 +2780,11 @@ handle_connections (gnupg_fd_t listen_fd,
gnupg_fd_t fd;
int nfd;
int saved_errno;
@@ -91,7 +91,7 @@ index 43ca673..cb5a391 100644
#ifdef HAVE_W32_SYSTEM
HANDLE events[2];
unsigned int events_set;
-@@ -2755,6 +2751,14 @@ handle_connections (gnupg_fd_t listen_fd,
+@@ -2803,6 +2801,14 @@ handle_connections (gnupg_fd_t listen_fd,
{ "browser", start_connection_thread_browser },
{ "ssh", start_connection_thread_ssh }
};
@@ -106,7 +106,7 @@ index 43ca673..cb5a391 100644
ret = npth_attr_init(&tattr);
-@@ -2844,9 +2848,6 @@ handle_connections (gnupg_fd_t listen_fd,
+@@ -2910,9 +2916,6 @@ handle_connections (gnupg_fd_t listen_fd,
listentbl[2].l_fd = listen_fd_browser;
listentbl[3].l_fd = listen_fd_ssh;
@@ -116,7 +116,7 @@ index 43ca673..cb5a391 100644
for (;;)
{
/* Shutdown test. */
-@@ -2875,18 +2876,46 @@ handle_connections (gnupg_fd_t listen_fd,
+@@ -2947,18 +2950,46 @@ handle_connections (gnupg_fd_t listen_fd,
thus a simple assignment is fine to copy the entire set. */
read_fdset = fdset;
@@ -172,7 +172,7 @@ index 43ca673..cb5a391 100644
npth_sigev_sigmask ());
saved_errno = errno;
-@@ -2896,7 +2925,7 @@ handle_connections (gnupg_fd_t listen_fd,
+@@ -2968,7 +2999,7 @@ handle_connections (gnupg_fd_t listen_fd,
handle_signal (signo);
}
#else
@@ -181,7 +181,7 @@ index 43ca673..cb5a391 100644
events, &events_set);
saved_errno = errno;
-@@ -2919,7 +2948,6 @@ handle_connections (gnupg_fd_t listen_fd,
+@@ -2991,7 +3022,6 @@ handle_connections (gnupg_fd_t listen_fd,
if (!shutdown_pending)
{
diff --git a/debian/patches/gpg-agent-idling/0009-agent-Allow-threads-to-interrupt-main-select-loop-wi.patch b/debian/patches/gpg-agent-idling/0009-agent-Allow-threads-to-interrupt-main-select-loop-wi.patch
index 7fe17c0..401c8eb 100644
--- a/debian/patches/gpg-agent-idling/0009-agent-Allow-threads-to-interrupt-main-select-loop-wi.patch
+++ b/debian/patches/gpg-agent-idling/0009-agent-Allow-threads-to-interrupt-main-select-loop-wi.patch
@@ -21,10 +21,10 @@ Signed-off-by: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/agent/agent.h b/agent/agent.h
-index 01e675b..fadc8e8 100644
+index 815d9a5..2131563 100644
--- a/agent/agent.h
+++ b/agent/agent.h
-@@ -349,6 +349,7 @@ void *get_agent_scd_notify_event (void);
+@@ -353,6 +353,7 @@ void *get_agent_scd_notify_event (void);
#endif
void agent_sighup_action (void);
int map_pk_openpgp_to_gcry (int openpgp_algo);
@@ -33,12 +33,12 @@ index 01e675b..fadc8e8 100644
/*-- command.c --*/
gpg_error_t agent_inq_pinentry_launched (ctrl_t ctrl, unsigned long pid,
diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c
-index cb5a391..8306917 100644
+index a867d51..2052adb 100644
--- a/agent/gpg-agent.c
+++ b/agent/gpg-agent.c
-@@ -386,6 +386,9 @@ static char *current_logfile;
- watched. */
- static pid_t parent_pid = (pid_t)(-1);
+@@ -397,6 +397,9 @@ static int have_homedir_inotify;
+ * works reliable. */
+ static int reliable_homedir_inotify;
+/* Record the pid of the main thread, for easier signalling */
+static pid_t main_thread_pid = (pid_t)(-1);
@@ -46,7 +46,7 @@ index cb5a391..8306917 100644
/* Number of active connections. */
static int active_connections;
-@@ -2041,7 +2044,7 @@ get_agent_scd_notify_event (void)
+@@ -2074,7 +2077,7 @@ get_agent_scd_notify_event (void)
GetCurrentProcess(), &h2,
EVENT_MODIFY_STATE|SYNCHRONIZE, TRUE, 0))
{
@@ -55,7 +55,7 @@ index cb5a391..8306917 100644
w32_strerror (-1) );
CloseHandle (h);
}
-@@ -2367,6 +2370,10 @@ handle_signal (int signo)
+@@ -2416,6 +2419,10 @@ handle_signal (int signo)
agent_sigusr2_action ();
break;
@@ -66,7 +66,7 @@ index cb5a391..8306917 100644
case SIGTERM:
if (!shutdown_pending)
log_info ("SIGTERM received - shutting down ...\n");
-@@ -2705,6 +2712,13 @@ start_connection_thread_ssh (void *arg)
+@@ -2754,6 +2761,13 @@ start_connection_thread_ssh (void *arg)
}
@@ -80,7 +80,7 @@ index cb5a391..8306917 100644
/* helper function for readability: test whether a given struct
timespec is set to all-zeros */
static inline int
-@@ -2773,8 +2787,10 @@ handle_connections (gnupg_fd_t listen_fd,
+@@ -2823,8 +2837,10 @@ handle_connections (gnupg_fd_t listen_fd,
npth_sigev_add (SIGUSR1);
npth_sigev_add (SIGUSR2);
npth_sigev_add (SIGINT);
diff --git a/debian/patches/gpg-agent-idling/0010-agent-Avoid-tight-timer-tick-when-possible.patch b/debian/patches/gpg-agent-idling/0010-agent-Avoid-tight-timer-tick-when-possible.patch
index af18cb0..284da42 100644
--- a/debian/patches/gpg-agent-idling/0010-agent-Avoid-tight-timer-tick-when-possible.patch
+++ b/debian/patches/gpg-agent-idling/0010-agent-Avoid-tight-timer-tick-when-possible.patch
@@ -39,10 +39,10 @@ index cf61a35..d8fe35a 100644
leave:
xfree (abs_homedir);
diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c
-index 8306917..71606e9 100644
+index 2052adb..d90065d 100644
--- a/agent/gpg-agent.c
+++ b/agent/gpg-agent.c
-@@ -2288,6 +2288,26 @@ create_directories (void)
+@@ -2326,6 +2326,26 @@ create_directories (void)
}
@@ -69,7 +69,7 @@ index 8306917..71606e9 100644
/* This is the worker for the ticker. It is called every few seconds
and may only do fast operations. */
-@@ -2346,7 +2366,7 @@ agent_sigusr2_action (void)
+@@ -2395,7 +2415,7 @@ agent_sigusr2_action (void)
#ifndef HAVE_W32_SYSTEM
/* The signal handler for this program. It is expected to be run in
@@ -78,7 +78,7 @@ index 8306917..71606e9 100644
static void
handle_signal (int signo)
{
-@@ -2627,7 +2647,8 @@ do_start_connection_thread (ctrl_t ctrl)
+@@ -2676,7 +2696,8 @@ do_start_connection_thread (ctrl_t ctrl)
agent_deinit_default_ctrl (ctrl);
xfree (ctrl);
@@ -88,7 +88,7 @@ index 8306917..71606e9 100644
return NULL;
}
-@@ -2707,7 +2728,8 @@ start_connection_thread_ssh (void *arg)
+@@ -2756,7 +2777,8 @@ start_connection_thread_ssh (void *arg)
agent_deinit_default_ctrl (ctrl);
xfree (ctrl);
@@ -98,7 +98,7 @@ index 8306917..71606e9 100644
return NULL;
}
-@@ -2892,6 +2914,9 @@ handle_connections (gnupg_fd_t listen_fd,
+@@ -2966,6 +2988,9 @@ handle_connections (gnupg_fd_t listen_fd,
thus a simple assignment is fine to copy the entire set. */
read_fdset = fdset;
diff --git a/debian/patches/gpg-agent-idling/0011-agent-Avoid-scheduled-checks-on-socket-when-inotify-.patch b/debian/patches/gpg-agent-idling/0011-agent-Avoid-scheduled-checks-on-socket-when-inotify-.patch
index ad92ab8..dc41f33 100644
--- a/debian/patches/gpg-agent-idling/0011-agent-Avoid-scheduled-checks-on-socket-when-inotify-.patch
+++ b/debian/patches/gpg-agent-idling/0011-agent-Avoid-scheduled-checks-on-socket-when-inotify-.patch
@@ -12,15 +12,15 @@ Signed-off-by: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
1 file changed, 2 insertions(+)
diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c
-index 71606e9..098a335 100644
+index d90065d..f50e739 100644
--- a/agent/gpg-agent.c
+++ b/agent/gpg-agent.c
-@@ -2916,6 +2916,8 @@ handle_connections (gnupg_fd_t listen_fd,
+@@ -2990,6 +2990,8 @@ handle_connections (gnupg_fd_t listen_fd,
/* avoid a fine-grained timer if we don't need one: */
timertbl[0].interval.tv_sec = need_tick () ? TIMERTICK_INTERVAL : 0;
+ /* avoid waking up to check sockets if we can count on inotify */
-+ timertbl[1].interval.tv_sec = (my_inotify_fd == -1) ? CHECK_OWN_SOCKET_INTERVAL : 0;
++ timertbl[1].interval.tv_sec = (sock_inotify_fd == -1) ? CHECK_OWN_SOCKET_INTERVAL : 0;
/* loop through all timers, fire any registered functions, and
plan next timer to trigger */
diff --git a/debian/patches/skip-missing-signing-keys/0013-g10-Skip-signing-keys-where-no-secret-key-is-availab.patch b/debian/patches/skip-missing-signing-keys/0013-g10-Skip-signing-keys-where-no-secret-key-is-availab.patch
index 790ea39..de21fe4 100644
--- a/debian/patches/skip-missing-signing-keys/0013-g10-Skip-signing-keys-where-no-secret-key-is-availab.patch
+++ b/debian/patches/skip-missing-signing-keys/0013-g10-Skip-signing-keys-where-no-secret-key-is-availab.patch
@@ -31,10 +31,10 @@ Signed-off-by: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
1 file changed, 7 insertions(+)
diff --git a/g10/getkey.c b/g10/getkey.c
-index d8c81c9..a81041f 100644
+index 79bce61..6859b5e 100644
--- a/g10/getkey.c
+++ b/g10/getkey.c
-@@ -3549,6 +3549,13 @@ finish_lookup (kbnode_t keyblock, unsigned int req_usage, int want_exact,
+@@ -3570,6 +3570,13 @@ finish_lookup (kbnode_t keyblock, unsigned int req_usage, int want_exact,
continue;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list