[3748] in testers
Re: sun4 [8.2.1]: sshd
daemon@ATHENA.MIT.EDU (John Hawkinson)
Fri Jul 10 11:38:57 1998
Date: Fri, 10 Jul 1998 11:38:31 -0400 (EDT)
To: testers@MIT.EDU
In-Reply-To: "[3587] in testers"
From: John Hawkinson <jhawk@MIT.EDU>
Jonathon mentioned:
| Yo, got any documentation, or other info?
| Well, I thought setting the Idletimeout to 522 weeks was
| reasonable. I settled for 4, I can probably live with
| that. :-)
So, it was suggested by some that this was a select() bug that
such values could not be supported.
After some germination time, I filed a bug with Sun (Bug Id
4155428). Part of the outgrowth of that were two observations:
a) The manpage for select(3c) under Solaris 2.6 sez:
ERRORS
...
EINVAL A component of the pointed-to time limit is out-
side the acceptable range: t_sec must be between
0 and 10^8, inclusive. t_usec must be greater than
or equal to 0, and less than 10^6.
So that's where one limit comes from.
The other is that the X/Open CAE Specification "System Interfaces and
Headers", Volume 2, on or around page 746 (depending on version),
states:
Implementations may place limitations on the maximum
timeout interval supported. On all implementations, the
maximum timeout interval supported will be at least 31
days. If the timeout argument specifies a timeout
interval greater than the implementation-dependent
maximum value, the maximum value will be used as the
actual timeout value. Implementations may also place
limitations on the granularity of timeout intervals. If the
requested timeout interval requires a finer granularity
than the implementation supports, the actual timeout
interval will be rounded up to the next supported value.
I found a copy on http://www.opengroup.org/onlinepubs/7908799/xsh/select.html.
[ Aside: do we have copies of the X/Open specs? If not, Dev and SIPB should
probably both buy some... ]
Anyhow, at such times as Sun is pretending to be X/Open compliant,
they're within their rights to reject timeouts longer than 32 days.
While 25 days isn't longer than 32 days, so they're still technically
noncompliant, the spirit of the paragraph makes it clear that applications
need to Just Deal Specially if they want to permit long select() timeouts.
It's worth oberserving that despite what you set the timeout to, in the
current implementation, Sun will never timeout for more than 24 days.
As such, sshd is pseudobroken if it expects such large timeouts to work.
--jhawk