diff options
author | djm@openbsd.org <djm@openbsd.org> | 2021-11-18 03:07:20 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2021-11-18 14:11:38 +1100 |
commit | b99498d0c93f1edd04857b318308a66b28316bd8 (patch) | |
tree | c19ccb3133ae00af0b4bad4b67b1f5cbf56fde86 /sshd.c | |
parent | 1f3055d788e8cf80851eb1728b535d57eb0dba6a (diff) | |
download | openssh-git-b99498d0c93f1edd04857b318308a66b28316bd8.tar.gz |
upstream: check for POLLHUP as well as POLLIN in sshd listen loop;
ok deraadt millert
OpenBSD-Commit-ID: a4f1244c5a9c2b08dac4f3b1dc22e9d1dc60c587
Diffstat (limited to 'sshd.c')
-rw-r--r-- | sshd.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: sshd.c,v 1.580 2021/11/17 21:06:39 djm Exp $ */ +/* $OpenBSD: sshd.c,v 1.581 2021/11/18 03:07:20 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1218,7 +1218,7 @@ server_accept_loop(int *sock_in, int *sock_out, int *newsock, int *config_s) for (i = 0; i < options.max_startups; i++) { if (startup_pipes[i] == -1 || - !(pfd[num_listen_socks+i].revents & POLLIN)) + !(pfd[num_listen_socks+i].revents & (POLLIN|POLLHUP))) continue; switch (read(startup_pipes[i], &c, sizeof(c))) { case -1: |