Add a comment to utmp.h about the sizes of UT_HOSTSIZE and UT_LINESIZE.

UT_HOSTSIZE and UT_LINESIZE are too small right now. If we ever bump
UT_HOSTSIZE, we must not forget to increase UT_LINESIZE as well. If we
add a comment, we're pretty sure we increase both values at the same
time.

PR:	bin/108743 (maybe others)
This commit is contained in:
ed 2008-11-16 14:43:33 +00:00
parent 89701909aa
commit dc9c7a01f6

View File

@ -46,6 +46,13 @@
#define _PATH_WTMP "/var/log/wtmp"
#define _PATH_LASTLOG "/var/log/lastlog"
/*
* XXX: These values are too low, but cannot be changed without breaking
* the file format. Right now pts(4) is limited to 1000 instances,
* because /dev/pts/1000 would require UT_LINESIZE to be bigger.
* UT_HOSTSIZE is also too small to hold most common hostnames or IPv6
* addresses.
*/
#define UT_NAMESIZE 16 /* see MAXLOGNAME in <sys/param.h> */
#define UT_LINESIZE 8
#define UT_HOSTSIZE 16