lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4B3A64A8.5040104@garzik.org>
Date:	Tue, 29 Dec 2009 15:20:56 -0500
From:	Jeff Garzik <jeff@...zik.org>
To:	Samuel Thibault <samuel.thibault@...-lyon.org>,
	"Robert P. J. Day" <rpjday@...shcourse.ca>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: what's the purpose of MAXHOSTNAMELEN?

On 12/29/2009 02:56 PM, Samuel Thibault wrote:
> Jeff Garzik, le Tue 29 Dec 2009 14:40:05 -0500, a écrit :
>> On 12/29/2009 02:19 PM, Robert P. J. Day wrote:
>>> arch/s390/include/asm/param.h:#define MAXHOSTNAMELEN	64	/* max
>>> length of hostname */
>>>
>>>    so lots of people define it but no one uses it.  it *is* exported to
>>> user space in /usr/include/asm/param.h, but i still have no idea what
>>> it's for in user space.  obsolete?
>>
>> According to RFC 1034, "Each node has a label, which is zero to 63
>> octets in length"
>
> That's for Internet networks.  Other kinds of networks could implement
> more.  It could make sense to restrict ourself to Internet standards,
> but we don't :)

Er huh?  That was a description of the origin of the limit.

And as a point of fact, we do restrict ourself to that:

	#define __NEW_UTS_LEN 64

	struct new_utsname {
	        char sysname[__NEW_UTS_LEN + 1];
	        char nodename[__NEW_UTS_LEN + 1];



>> What is it used for in userspace, and why is it export from the kernel?
>
> Gethostname, typically, but also all kinds of functions that provide a
> hostname.  It's also quite often completely badly used, for instance for
> getnameinfo()...
>
> You have Debian's list on
> http://unstable.buildd.net/buildd/hurd-i386_Failed.html

No one cares about Hurd.

	Jeff




--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ