diff options
-rw-r--r-- | ssh-agent.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/ssh-agent.c b/ssh-agent.c index d858c2470..0c6c36592 100644 --- a/ssh-agent.c +++ b/ssh-agent.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh-agent.c,v 1.223 2017/07/19 01:15:02 djm Exp $ */ | 1 | /* $OpenBSD: ssh-agent.c,v 1.224 2017/07/24 04:34:28 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -949,7 +949,7 @@ prepare_poll(struct pollfd **pfdp, size_t *npfdp, int *timeoutp) | |||
949 | deadline = (deadline == 0) ? parent_alive_interval : | 949 | deadline = (deadline == 0) ? parent_alive_interval : |
950 | MINIMUM(deadline, parent_alive_interval); | 950 | MINIMUM(deadline, parent_alive_interval); |
951 | if (deadline == 0) { | 951 | if (deadline == 0) { |
952 | *timeoutp = INFTIM; | 952 | *timeoutp = -1; /* INFTIM */ |
953 | } else { | 953 | } else { |
954 | if (deadline > INT_MAX / 1000) | 954 | if (deadline > INT_MAX / 1000) |
955 | *timeoutp = INT_MAX / 1000; | 955 | *timeoutp = INT_MAX / 1000; |
@@ -1018,7 +1018,6 @@ main(int ac, char **av) | |||
1018 | { | 1018 | { |
1019 | int c_flag = 0, d_flag = 0, D_flag = 0, k_flag = 0, s_flag = 0; | 1019 | int c_flag = 0, d_flag = 0, D_flag = 0, k_flag = 0, s_flag = 0; |
1020 | int sock, fd, ch, result, saved_errno; | 1020 | int sock, fd, ch, result, saved_errno; |
1021 | u_int nalloc; | ||
1022 | char *shell, *format, *pidstr, *agentsocket = NULL; | 1021 | char *shell, *format, *pidstr, *agentsocket = NULL; |
1023 | #ifdef HAVE_SETRLIMIT | 1022 | #ifdef HAVE_SETRLIMIT |
1024 | struct rlimit rlim; | 1023 | struct rlimit rlim; |
@@ -1029,7 +1028,7 @@ main(int ac, char **av) | |||
1029 | char pidstrbuf[1 + 3 * sizeof pid]; | 1028 | char pidstrbuf[1 + 3 * sizeof pid]; |
1030 | size_t len; | 1029 | size_t len; |
1031 | mode_t prev_mask; | 1030 | mode_t prev_mask; |
1032 | int timeout = INFTIM; | 1031 | int timeout = -1; /* INFTIM */ |
1033 | struct pollfd *pfd = NULL; | 1032 | struct pollfd *pfd = NULL; |
1034 | size_t npfd = 0; | 1033 | size_t npfd = 0; |
1035 | 1034 | ||
@@ -1252,7 +1251,6 @@ skip: | |||
1252 | signal(SIGINT, (d_flag | D_flag) ? cleanup_handler : SIG_IGN); | 1251 | signal(SIGINT, (d_flag | D_flag) ? cleanup_handler : SIG_IGN); |
1253 | signal(SIGHUP, cleanup_handler); | 1252 | signal(SIGHUP, cleanup_handler); |
1254 | signal(SIGTERM, cleanup_handler); | 1253 | signal(SIGTERM, cleanup_handler); |
1255 | nalloc = 0; | ||
1256 | 1254 | ||
1257 | if (pledge("stdio rpath cpath unix id proc exec", NULL) == -1) | 1255 | if (pledge("stdio rpath cpath unix id proc exec", NULL) == -1) |
1258 | fatal("%s: pledge: %s", __progname, strerror(errno)); | 1256 | fatal("%s: pledge: %s", __progname, strerror(errno)); |