[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: forwarded message from mouring@etoh.eviladmin.org

On Mon, Jul 23, 2001 at 12:49:14AM +0100, Matthew Vernon wrote:
> ------- start of forwarded message -------
> From: <mouring@etoh.eviladmin.org>
> To: Matthew Vernon <matthew@empire.ucam.org>
> cc: <openssh-unix-dev@mindrot.org>
> Subject: Re: [patch] GNU/Hurd compatibility patches
> Date: Sun, 22 Jul 2001 12:39:32 -0500 (CDT)
> We already rejected this patch as it distrupts too much code for no good
> reason (Look back on the marc archives).

(The patch is about removing the arbitrary limit on the length of hostnames
used by openssh.)

> If Hurd decides to be POSIX
> compatable; we will be happy to accept patches for them.  But from
> what I'm reading on the Hurd summary mailinglist it may be a long time.

We are POSIX compatible (modulo bugs), at least we make the claim.
We are happy to check the standard for each individual concern about
compatibility you might raise.

Concerning MAXHOSTNAMELEN, this symbol is widely spread on UNIX and other
systems, but it is not defined by any released version of POSIX.  The Single
Unix Specification says that hostnames are limited to 255 characters,
however, the upcoming POSIX draft which is supposed to cover also the area that
SUSv2 does, does fix this.  Again, the upcoming POSIX draft as reviewed by
the Austin Group (I have draft6 here), does not define MAXHOSTNAMELEN (just
as it doesn't define MAXPATHLEN), but it does say something about
the new symbol HOST_NAME_MAX:

"Runtime Invariant Values (Possibly Indeterminate)

 A definition of one of the symbolic names in the following list shall be
 omitted from <limits.h> on specific implementations where the corresponding
 value is equal to or greater than the stated minimum, but is unspecified.

   Maximum length of a host name (not including the terminating null)
   as returned from the gethostname( ) function.
   Minimum Acceptable Value: {_POSIX_HOST_NAME_MAX}

   Maximum length of a host name (not including the
   terminating null) as returned from the
   gethostname( ) function.
   Value: 255"

(note that _POSIX_HOST_NAME_MAX defines the minimum acceptable value in an
implementation).  Please note that because the length of a hostname is
unlimited on the Hurd, we do not define MAXHOSTNAMELEN now, and will not
define HOST_NAME_MAX when the new POSIX draft (or any later draft with the
above text) becomes a standard.  

According to the current draft, you will be able to query a possible run time
limit with sysconf() and _SC_HOST_NAME_MAX, but again, the Hurd will just
return -1 on this call, indicating that there is no limit.

> Until such time they will have to maintain their own version.  Or come up
> with a better way of handling their inconsistance behavior.

Please reconsider.  I feel that a fork of the software is completely
unnecessary.  If you don't accept our patch, maybe we can write a better
patch.  For this, we would need to know what specific parts make you unhappy
and how you would like them to be written in a better way.  If you don't want
to deal with arbitrary hostname lengths, even on systems which support them,
you can define an arbitrary limit (greater than 255) yourself, and deal with
gethostname returning -1 if the name doesn't fit.  ssh does then impose an
arbitrary restriction on the Hurd, and not deliver the systems flexibility
fully to the user, but it will work in all (currently) common cases.
We definiteily don't want to maintain our own version of the patch or ssh.

It is our goal to improve the portability of your ssh.  If you share this
goal, please help us by letting us know how we can achieve it.


`Rhubarb is no Egyptian god.' Debian http://www.debian.org brinkmd@debian.org
Marcus Brinkmann              GNU    http://www.gnu.org    marcus@gnu.org

Reply to: