Re: Porting Bind
--- Neal H Walfield <firstname.lastname@example.org> 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
> 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
> > + 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: email@example.com
| | WWW: http://www.geocities.com/cronos1_mx/
Do You Yahoo!? -- Un e-mail gratuit @yahoo.fr !
Yahoo! Courrier : http://fr.mail.yahoo.com