From 71a95aef09c3937afc83263814fa93df0c5acd5d Mon Sep 17 00:00:00 2001 From: deraadt <> Date: Wed, 31 Jan 2001 17:42:26 +0000 Subject: [PATCH] move utmp to large format, usernames to 32 chars; downsj --- src/include/pwd.h | 3 ++- src/include/utmp.h | 22 +++++++++++++++++++--- src/lib/libutil/shlib_version | 2 +- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/include/pwd.h b/src/include/pwd.h index 3aa7ae9c..0c3ec950 100644 --- a/src/include/pwd.h +++ b/src/include/pwd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pwd.h,v 1.9 2000/11/21 00:49:59 millert Exp $ */ +/* $OpenBSD: pwd.h,v 1.10 2001/01/31 17:42:25 deraadt Exp $ */ /* $NetBSD: pwd.h,v 1.9 1996/05/15 21:36:45 jtc Exp $ */ /*- @@ -67,6 +67,7 @@ #define _PASSWORD_EFMT1 '_' /* extended encryption format */ #define _PASSWORD_LEN 128 /* max length, not counting NULL */ +#define _PW_NAME_LEN 32 /* max length, not counting NULL */ #define _PASSWORD_NOUID 0x01 /* flag for no specified uid. */ #define _PASSWORD_NOGID 0x02 /* flag for no specified gid. */ diff --git a/src/include/utmp.h b/src/include/utmp.h index d0d21a9d..1a6d0104 100644 --- a/src/include/utmp.h +++ b/src/include/utmp.h @@ -1,4 +1,4 @@ -/* $OpenBSD: utmp.h,v 1.3 1999/04/21 15:15:39 millert Exp $ */ +/* $OpenBSD: utmp.h,v 1.4 2001/01/31 17:42:25 deraadt Exp $ */ /* $NetBSD: utmp.h,v 1.6 1994/10/26 00:56:40 cgd Exp $ */ /* @@ -48,9 +48,9 @@ #define _PATH_WTMP "/var/log/wtmp" #define _PATH_LASTLOG "/var/log/lastlog" -#define UT_NAMESIZE 8 +#define UT_NAMESIZE 32 #define UT_LINESIZE 8 -#define UT_HOSTSIZE 16 +#define UT_HOSTSIZE 256 /* * Note that these are *not* C strings and thus are not @@ -70,4 +70,20 @@ struct utmp { time_t ut_time; }; +/* + * These should not be used for writing out new data, for reference only. + */ +struct old_lastlog { + time_t ll_time; + char ll_line[8]; + char ll_host[16]; +}; + +struct old_utmp { + char ut_line[8]; + char ut_name[8]; + char ut_host[16]; + time_t ut_time; +}; + #endif /* !_UTMP_H_ */ diff --git a/src/lib/libutil/shlib_version b/src/lib/libutil/shlib_version index 3066b977..9c155163 100644 --- a/src/lib/libutil/shlib_version +++ b/src/lib/libutil/shlib_version @@ -1,2 +1,2 @@ -major=5 +major=6 minor=0