Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Nov 2008 14:43:33 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r185000 - head/include
Message-ID:  <200811161443.mAGEhXFO055868@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ed
Date: Sun Nov 16 14:43:33 2008
New Revision: 185000
URL: http://svn.freebsd.org/changeset/base/185000

Log:
  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)

Modified:
  head/include/utmp.h

Modified: head/include/utmp.h
==============================================================================
--- head/include/utmp.h	Sun Nov 16 13:19:47 2008	(r184999)
+++ head/include/utmp.h	Sun Nov 16 14:43:33 2008	(r185000)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811161443.mAGEhXFO055868>