From 3358eb51361a280e632f8a92d228c2c3077cac3d Mon Sep 17 00:00:00 2001 From: dwmalone Date: Mon, 2 Oct 2000 12:04:17 +0000 Subject: Stop internal ident service spinning until the timeout if the connection goes away. Spotted by people on -STABLE about 2 weeks ago. Submitted by: Based on a patch by alfred and Maxime Henrion --- usr.sbin/inetd/builtins.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'usr.sbin') diff --git a/usr.sbin/inetd/builtins.c b/usr.sbin/inetd/builtins.c index c32a98d..7d7d7a1 100644 --- a/usr.sbin/inetd/builtins.c +++ b/usr.sbin/inetd/builtins.c @@ -480,6 +480,8 @@ ident_stream(s, sep) /* Ident service (AKA "auth") */ ssize = read(s, &buf[size], (size_t)onreadlen); if (ssize == -1) iderror(0, 0, s, errno); + else if (ssize == 0) + break; bufsiz -= ssize; size += ssize; } -- cgit v1.1