[git] GnuPG - branch, master, updated. gnupg-2.1.15-276-g27f6d5b
by Daniel Kahn Gillmor
cvs at cvs.gnupg.org
Wed Oct 26 07:26:46 CEST 2016
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".
The branch, master has been updated
via 27f6d5b9f4b6057ddeb9ace87a1e7e61ebac63e6 (commit)
via 3b5f5e0eb02ecbdcf59722755f22a9d2f88de6e6 (commit)
from 852b8f0b89d447536dfdf6cd4ea91615c75491ce (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 27f6d5b9f4b6057ddeb9ace87a1e7e61ebac63e6
Author: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date: Tue Oct 25 23:55:08 2016 -0400
agent: --supervised mode improvements.
* agent/gpg-agent.c (map_supervised_socket): if the agent is running
in --supervised mode and is not actually given LISTEN_FDNAMES
directives, require at least fd 3 to be open for listening.
--
Signed-off-by: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c
index 16edae0..8e2d012 100644
--- a/agent/gpg-agent.c
+++ b/agent/gpg-agent.c
@@ -716,12 +716,19 @@ map_supervised_sockets (gnupg_fd_t *r_fd,
/* Assign the descriptors to the return values. */
if (!fdnames)
{
+ struct stat statbuf;
if (fd_count != 1)
log_error ("no LISTEN_FDNAMES and LISTEN_FDS (%d) != 1"
" in --supervised mode."
" (ignoring all sockets but the first one)\n",
fd_count);
+ if (fstat (3, &statbuf) == -1 && errno ==EBADF)
+ log_fatal ("file descriptor 3 must be valid in --supervised mode (as the "
+ "agent's standard socket) if LISTEN_FDNAMES is not set\n");
*r_fd = 3;
+ socket_name = get_socket_name (3);
+ if (!socket_name)
+ log_error ("cannot learn socket name for fd 3\n");
}
else if (fd_count != nfdnames)
{
commit 3b5f5e0eb02ecbdcf59722755f22a9d2f88de6e6
Author: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date: Tue Oct 25 23:55:07 2016 -0400
common: avoid segfault
* common/sysutils.c (gnupg_inotify_watch_socket): return EINVAL if
socket_name is NULL, rather than segfaulting
--
Signed-off-by: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
diff --git a/common/sysutils.c b/common/sysutils.c
index ab2012c..ab3e1d6 100644
--- a/common/sysutils.c
+++ b/common/sysutils.c
@@ -987,6 +987,9 @@ gnupg_inotify_watch_socket (int *r_fd, const char *socket_name)
*r_fd = -1;
+ if (!socket_name)
+ return gpg_error (GPG_ERR_EINVAL);
+
fname = xtrystrdup (socket_name);
if (!fname)
return my_error_from_syserror ();
-----------------------------------------------------------------------
Summary of changes:
agent/gpg-agent.c | 7 +++++++
common/sysutils.c | 3 +++
2 files changed, 10 insertions(+)
hooks/post-receive
--
The GNU Privacy Guard
http://git.gnupg.org
More information about the Gnupg-commits
mailing list