Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 03 Jan 1997 11:16:25 -0800
From:      Paul Traina <pst@shockwave.com>
To:        Poul-Henning Kamp <phk@critter.dk.tfs.com>
Cc:        jkh@freebsd.org, current@freebsd.org
Subject:   Re: utmp changes 
Message-ID:  <199701031916.LAA15717@precipice.shockwave.com>
In-Reply-To: Your message of "Fri, 03 Jan 1997 19:45:59 %2B0100." <18403.852317159@critter.dk.tfs.com> 

next in thread | previous in thread | raw e-mail | index | archive | help

  From: Poul-Henning Kamp <phk@critter.dk.tfs.com>
  Subject: Re: utmp changes 
  
  No what I wanted was a space for the key-name for ssh and a flag for the
  fact that the session is encrypted.

OK, then it was someone else who was talking about larger hostname sizes
and IP addresses.  I'm more concerned about either making the space now,
or at least creating a "RESERVED" area (we should do that anyway) in utmp
and wtmp.

To start the ball rolling, let me just suggest the following.  I know it's
not pretty, and I'm not so sure that the remote ssh key belongs in utmp,
but this is what I conceive as changing.  The big thing is I'd like to fix
the size of the utmp structure once and for all, and define the reserved
area as must-be-zero so we don't get in the mess we just got in ever again. :-(

#define	UT_NAMESIZE	16
#define	UT_LINESIZE	8
#define	UT_HOSTSIZE	64	/* was 16 */
#define	UT_HADDRSIZE	16	/* remote host address */
#define	UT_KEYSIZE	16	/* for ssh key? hmmm... I'm not so sure... */
#define	UT_FLAGSIZE	1

struct lastlog {
	time_t	ll_time;
	char	ll_line[UT_LINESIZE];
	char	ll_host[UT_HOSTSIZE];
	char	ll_hadd[UT_HADDSIZE];		/* new */

	char	_ll_reserved[256 - cruft];	/* must be zero */
};

struct utmp {
	char	ut_line[UT_LINESIZE];
	char	ut_name[UT_NAMESIZE];
	char	ut_host[UT_HOSTSIZE];
	char	ut_haddr[UT_HADDSIZE];
	char	ut_flags[UT_FLAGSIZE];
	long	ut_time;

	char	ut_key[UT_KEYSIZE];	/* do we really want this in utmp? */
	char	_ut_reserved[256 - cruft];	/* must be zero */
};

#endif /* !_UTMP_H_ */
  
  >(I'm really unhappy about X11 code changing.  Perhaps it's time to augment
  > the utmp/wtmp write stuff in libutil into a full blown read/write package?)
  
  yes.
  
  --
  Poul-Henning Kamp           | phk@FreeBSD.ORG       FreeBSD Core-team.
  http://www.freebsd.org/~phk | phk@login.dknet.dk    Private mailbox.
  whois: [PHK]                | phk@tfs.com           TRW Financial Systems, In
>>c.
  Power and ignorance is a disgusting cocktail.



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