[openssh-commits] [openssh] 01/04: upstream: Log an error if pipe() fails while accepting a
git+noreply at mindrot.org
git+noreply at mindrot.org
Fri Jun 24 14:28:46 AEST 2022
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
commit ad1762173bb38716a106e8979806149fd0f2753e
Author: dtucker at openbsd.org <dtucker at openbsd.org>
Date: Fri Jun 17 01:00:03 2022 +0000
upstream: Log an error if pipe() fails while accepting a
connection. bz#3447, from vincent-openssh at vinc17 net, ok djm@
OpenBSD-Commit-ID: 9d59f19872b94900a5c79da2d57850241ac5df94
---
sshd.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/sshd.c b/sshd.c
index 0ee65b54..f494cdbb 100644
--- a/sshd.c
+++ b/sshd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshd.c,v 1.585 2022/03/18 04:04:11 djm Exp $ */
+/* $OpenBSD: sshd.c,v 1.586 2022/06/17 01:00:03 dtucker Exp $ */
/*
* Author: Tatu Ylonen <ylo at cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -1267,8 +1267,12 @@ server_accept_loop(int *sock_in, int *sock_out, int *newsock, int *config_s)
usleep(100 * 1000);
continue;
}
- if (unset_nonblock(*newsock) == -1 ||
- pipe(startup_p) == -1) {
+ if (unset_nonblock(*newsock) == -1) {
+ close(*newsock);
+ continue;
+ }
+ if (pipe(startup_p) == -1) {
+ error_f("pipe(startup_p): %s", strerror(errno));
close(*newsock);
continue;
}
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list