From owner-freebsd-stable Wed Sep 20 15:33:21 2000 Delivered-To: freebsd-stable@freebsd.org Received: from camus.cybercable.fr (camus.cybercable.fr [212.198.0.200]) by hub.freebsd.org (Postfix) with SMTP id D341837B422 for ; Wed, 20 Sep 2000 15:33:18 -0700 (PDT) Received: (qmail 20766775 invoked from network); 20 Sep 2000 22:12:31 -0000 Received: from r122m215.cybercable.tm.fr (HELO qualys.com) ([195.132.122.215]) (envelope-sender ) by camus.cybercable.fr (qmail-ldap-1.03) with SMTP for ; 20 Sep 2000 22:12:31 -0000 Message-ID: <39C936CE.FA1AAF31@qualys.com> Date: Thu, 21 Sep 2000 00:14:38 +0200 From: Maxime Henrion X-Mailer: Mozilla 4.75 [en] (X11; U; FreeBSD 4.1-STABLE i386) X-Accept-Language: en MIME-Version: 1.0 To: David Malone , stable@freebsd.org Subject: Re: patch for inetd References: <39C8D00D.FBE1407F@qualys.com> <20000920165505.A56705@walton.maths.tcd.ie> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG David Malone wrote: > > *** /usr/src/usr.sbin/inetd/builtins.c Wed Sep 20 16:49:26 2000 > > --- builtins.c Wed Jul 19 22:27:19 2000 > > *************** > > *** 480,487 **** > > ssize = read(s, &buf[size], (size_t)onreadlen); > > if (ssize == -1) > > iderror(0, 0, s, errno); > > - else if (ssize == 0) > > - return; > > bufsiz -= ssize; > > size += ssize; > > } > > --- 480,485 ---- > > You don't wan't to return from the ident builtin, I'd actually > suggest "break;" to see if you've recieved enough of a request to > be able to answer. You may still be able to send data to the other > end, as they may just have shutdown half of the connection. > I didn't know that at all, so a "break;" is effectively more appropriate. > > Alfred's patch with the iderror for the EOF case is reasonable, > but I'd be as lienient as possible and attempt to answer the request. > Yeah, I got Alfred's patch after having sent mine. > > I'll test the patch with a break; when I get home and see if it > works OK. If alfred thinks it's OK I'll commit it. Great ! > David. Maxime PS: I'm sure you've noticed, but the I did the diff in the wrong sense, sorry. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message