Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 07 Feb 2001 08:53:42 +1100
From:      Peter Jeremy <peter.jeremy@alcatel.com.au>
To:        Matt Dillon <dillon@earth.backplane.com>
Cc:        Kris Kennaway <kris@obsecurity.org>, Brian Dean <bsd@bsdhome.com>, freebsd-stable@FreeBSD.ORG
Subject:   Re: installworld anomoly
Message-ID:  <20010207085342.X90937@gsmx07.alcatel.com.au>
In-Reply-To: <200102042108.f14L82U16403@earth.backplane.com>; from dillon@earth.backplane.com on Sun, Feb 04, 2001 at 01:08:02PM -0800
References:  <20010203154344.B27418@vger.bsdhome.com> <20010203125044.A40718@xor.obsecurity.org> <200102042108.f14L82U16403@earth.backplane.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2001-Feb-04 13:08:02 -0800, Matt Dillon <dillon@earth.backplane.com> wrote:
>   It's not a bug with OpenSSH, it's a bug with 'makewhatis'.  The
>   'makewhatis' perl script is closing the input descriptor without
>   draining all the input.  If the gzcat writing the descriptor does
>   not use a large enough buffer, the gzcat's write() will then fail.
>
>   This is not a bug with gzcat or a bug due to the pipe being too small
>   (there is no 'right' size for the pipe), it's a bug with 'makewhatis',
>   and a very easy bug to fix too.

I disagree with this fix.  By default, a write to a pipe with no reader
will cause a SIGPIPE.  The default action for SIGPIPE is to terminate
the process quietly.  OpenSSH has set SIGPIPE to SIG_IGN, resulting in
a write to a pipe with no reader returning EPIPE.  gzcat is correctly
detecting that the write failed, reporting an error and exiting.

Firstly, OpenSSH should not be changing the default signal behaviour
passed onto it's children.  This _is_ a bug and should be fixed.

Secondly, making makewhatis(1) read all available input before closing
the pipe is just unnecessarily slowing down makewhatis.  There's no
reason for makewhatis to process an entire man page - it just needs the
name and synopsis.  Once it has read that, it should dispose of that
man page and move onto the next ASAP.  There's no point in making
gzcat uncompress the entire man page.

Peter


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010207085342.X90937>