summaryrefslogtreecommitdiffstats
path: root/ssh-pkcs11-helper.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2021-11-18 04:31:44 +0100
committerDamien Miller <djm@mindrot.org>2021-11-18 04:32:54 +0100
commit875408270c5a7dd69ed5449e5d85bd7120c88f70 (patch)
treefff5263529b40a4799260135b1c06197d22e1771 /ssh-pkcs11-helper.c
parentupstream: fd leak in sshd listen loop error path; from Gleb (diff)
downloadopenssh-875408270c5a7dd69ed5449e5d85bd7120c88f70.tar.xz
openssh-875408270c5a7dd69ed5449e5d85bd7120c88f70.zip
upstream: check for POLLHUP wherever we check for POLLIN
OpenBSD-Commit-ID: 6aa6f3ec6b17c3bd9bfec672a917f003a76d93e5
Diffstat (limited to 'ssh-pkcs11-helper.c')
-rw-r--r--ssh-pkcs11-helper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ssh-pkcs11-helper.c b/ssh-pkcs11-helper.c
index 5ca8d03fb..5c3eaaeb0 100644
--- a/ssh-pkcs11-helper.c
+++ b/ssh-pkcs11-helper.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-pkcs11-helper.c,v 1.25 2021/08/11 05:20:17 djm Exp $ */
+/* $OpenBSD: ssh-pkcs11-helper.c,v 1.26 2021/11/18 03:31:44 djm Exp $ */
/*
* Copyright (c) 2010 Markus Friedl. All rights reserved.
*
@@ -385,7 +385,7 @@ main(int argc, char **argv)
}
/* copy stdin to iqueue */
- if ((pfd[0].revents & (POLLIN|POLLERR)) != 0) {
+ if ((pfd[0].revents & (POLLIN|POLLHUP|POLLERR)) != 0) {
len = read(in, buf, sizeof buf);
if (len == 0) {
debug("read eof");