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

Re: Porting Bind



 --- Neal H Walfield <neal@cs.uml.edu> a écrit : 
> > Yes, but as long as I prefer to do the easiest part first, I'll start fix=
> > ing
> > the MAXHOSTNALELEN issue. To achieve this, I modified Neal's xgethostname=
> > .c to
> > add the hostnamecpy function; it copies a hostname to another string and
> > enforces hostname length limits. Is it correct? If so, is it fine to add =
> > it to
> > Neal's library, or is better to write it separately? =20
> 
> Why do you think that this functionality is generally useful?  I have not
> heard
> of a hostnamecpy function before.

Me neither, but I think it's useful because it could be used to check
MAXHOSTNAMELEN limits in other OS as your xgethostname function does. It's easy
to use for fixing MAXHOSTNAMELEN issues and it's easy to improve their
portability. 

> > +  if (maxlen && (hostnamelen > (size + 1)))
> > +    return ENAMETOOLONG;
> 
> This is broken.  sysconf (_SC_HOST_NAME_MAX) returns -1 on the Hurd.

Ah, I didn't know that. If hostnamecpy is still a good idea, I'll fix it.

=====
--------- 
|   |   |                    Cronos 
|   |   |            "No confies en nadie mayor de treinta" 
|   ----| 
|       |            Email: cronos1_mx@yahoo.com 
|       |            WWW:   http://www.geocities.com/cronos1_mx/
---------

___________________________________________________________
Do You Yahoo!? -- Un e-mail gratuit @yahoo.fr !
Yahoo! Courrier : http://fr.mail.yahoo.com



Reply to: