summaryrefslogtreecommitdiff
path: root/security/openssh-portable/files/patch-ssh-agent.c
diff options
context:
space:
mode:
authorBryan Drewery <bdrewery@FreeBSD.org>2021-04-28 13:15:54 -0700
committerBryan Drewery <bdrewery@FreeBSD.org>2021-04-29 09:05:55 -0700
commitde9fffcec89b58fb6f77b72a55975eccb01eb480 (patch)
tree5ea27c3f83d0d0e0acc587fac85272e2ec9cafaf /security/openssh-portable/files/patch-ssh-agent.c
parentsysutils/javaservicewrapper: Fix build on arm (diff)
security/openssh-portable: Update to 8.6p1
- gssapi is disabled for now. Changes: - https://www.openssh.com/txt/release-8.5 - https://www.openssh.com/txt/release-8.6 Submitted by: Yasuhiro Kimura [earlier version][1] PR: 254389 [1]
Diffstat (limited to 'security/openssh-portable/files/patch-ssh-agent.c')
-rw-r--r--security/openssh-portable/files/patch-ssh-agent.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/security/openssh-portable/files/patch-ssh-agent.c b/security/openssh-portable/files/patch-ssh-agent.c
index 547c8e4958e2..de53881aa541 100644
--- a/security/openssh-portable/files/patch-ssh-agent.c
+++ b/security/openssh-portable/files/patch-ssh-agent.c
@@ -8,9 +8,9 @@ r226103 | des | 2011-10-07 08:10:16 -0500 (Fri, 07 Oct 2011) | 5 lines
Add a -x option that causes ssh-agent(1) to exit when all clients have
disconnected.
---- ssh-agent.c.orig 2020-09-27 00:25:01.000000000 -0700
-+++ ssh-agent.c 2020-11-09 09:07:10.924940000 -0800
-@@ -171,15 +171,34 @@ static int fingerprint_hash = SSH_FP_HASH_DEFAULT;
+--- ssh-agent.c.orig 2021-04-15 20:55:25.000000000 -0700
++++ ssh-agent.c 2021-04-27 11:47:59.362589000 -0700
+@@ -171,9 +171,26 @@ static int fingerprint_hash = SSH_FP_HASH_DEFAULT;
/* Refuse signing of non-SSH messages for web-origin FIDO keys */
static int restrict_websafe = 1;
@@ -35,20 +35,21 @@ disconnected.
+ last = 1;
+ }
close(e->fd);
- e->fd = -1;
- e->type = AUTH_UNUSED;
sshbuf_free(e->input);
sshbuf_free(e->output);
- sshbuf_free(e->request);
+@@ -181,6 +198,8 @@ close_socket(SocketEntry *e)
+ memset(e, '\0', sizeof(*e));
+ e->fd = -1;
+ e->type = AUTH_UNUSED;
+ if (last)
+ cleanup_exit(0);
}
static void
-@@ -961,6 +980,10 @@ new_socket(sock_type type, int fd)
- {
- u_int i, old_alloc, new_alloc;
+@@ -1067,6 +1086,10 @@ new_socket(sock_type type, int fd)
+ debug_f("type = %s", type == AUTH_CONNECTION ? "CONNECTION" :
+ (type == AUTH_SOCKET ? "SOCKET" : "UNKNOWN"));
+ if (type == AUTH_CONNECTION) {
+ debug("xcount %d -> %d", xcount, xcount + 1);
+ ++xcount;
@@ -56,7 +57,7 @@ disconnected.
set_nonblock(fd);
if (fd > max_fd)
-@@ -1261,7 +1284,7 @@ static void
+@@ -1360,7 +1383,7 @@ static void
usage(void)
{
fprintf(stderr,
@@ -65,7 +66,7 @@ disconnected.
" [-P allowed_providers] [-t life]\n"
" ssh-agent [-a bind_address] [-E fingerprint_hash] [-P allowed_providers]\n"
" [-t life] command [arg ...]\n"
-@@ -1295,6 +1318,7 @@ main(int ac, char **av)
+@@ -1394,6 +1417,7 @@ main(int ac, char **av)
/* drop */
setegid(getgid());
setgid(getgid());
@@ -73,7 +74,7 @@ disconnected.
platform_disable_tracing(0); /* strict=no */
-@@ -1306,7 +1330,7 @@ main(int ac, char **av)
+@@ -1405,7 +1429,7 @@ main(int ac, char **av)
__progname = ssh_get_progname(av[0]);
seed_rng();
@@ -82,7 +83,7 @@ disconnected.
switch (ch) {
case 'E':
fingerprint_hash = ssh_digest_alg_by_name(optarg);
-@@ -1355,6 +1379,9 @@ main(int ac, char **av)
+@@ -1454,6 +1478,9 @@ main(int ac, char **av)
fprintf(stderr, "Invalid lifetime\n");
usage();
}