AIX and Privsep.
Leigh Brown
leigh at solinno.co.uk
Fri Jul 5 01:59:03 EST 2002
Markus Friedl wrote:
> On Thu, Jul 04, 2002 at 10:05:29AM +0100, Leigh Brown wrote:
>>
>> - window = CHAN_SES_WINDOW_DEFAULT;
>> - packetmax = CHAN_SES_PACKET_DEFAULT;
>> if (tty_flag) {
>> - window >>= 1;
>> - packetmax >>= 1;
>> + window = CHAN_TTY_WINDOW_DEFAULT;
>> + packetmax = CHAN_TTY_PACKET_DEFAULT;
>> + } else {
>> + window = CHAN_SES_WINDOW_DEFAULT;
>> + packetmax = CHAN_SES_PACKET_DEFAULT;
>
> that's not the right place to fix, because the bug affects
> what can be written on the server side.
>
> i think you need sth like:
>
> Index: channels.c
> =================================================================== RCS
> file: /cvs/src/usr.bin/ssh/channels.c,v
> retrieving revision 1.180
> diff -u -r1.180 channels.c
> --- channels.c 4 Jul 2002 08:12:15 -0000 1.180
> +++ channels.c 4 Jul 2002 15:30:18 -0000
> @@ -1287,6 +1287,10 @@
> data = buffer_ptr(&c->output);
> dlen = buffer_len(&c->output);
> len = write(c->wfd, data, dlen);
> +#ifdef AIX
> + if (compat20 && c->isatty && dlen >= 8*1024)
> + dlen = 8*1024;
> +#endif
> if (len < 0 && (errno == EINTR || errno == EAGAIN))
> return 1;
> if (len <= 0) {
I don't understand the difference, but I don't care, because your fix
seems to work. Ironically, that's where I put my original "hack".
I'd be grateful if you could put that workaround in, possibly with
a comment like "workaround for AIX bug in 4.3.3ML03 and above".
Cheers,
Leigh.
More information about the openssh-unix-dev
mailing list