diff options
author | ed <ed@FreeBSD.org> | 2009-12-28 20:54:34 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2009-12-28 20:54:34 +0000 |
commit | 5bf232465b8e0def3c04c6e47745b969162463fe (patch) | |
tree | 572b8cc48e0e4fce2e62ea0eb3f0cf8dc6028a53 /usr.bin/finger/finger.h | |
parent | f60568ce2e9a52bcb63e2ad46f8bc34bf16b6273 (diff) | |
download | FreeBSD-src-5bf232465b8e0def3c04c6e47745b969162463fe.zip FreeBSD-src-5bf232465b8e0def3c04c6e47745b969162463fe.tar.gz |
Migrate finger(1) away from <utmp.h>.
Unfortunately it also uses lastlog, which means we must resort to local
extensions of the utmpx-interface. Because the user name and TTY name
are now nul-terminated, there is no need to copy around strings as
often.
Diffstat (limited to 'usr.bin/finger/finger.h')
-rw-r--r-- | usr.bin/finger/finger.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/finger/finger.h b/usr.bin/finger/finger.h index 6b18146..72a5554 100644 --- a/usr.bin/finger/finger.h +++ b/usr.bin/finger/finger.h @@ -62,8 +62,8 @@ typedef struct where { short writable; /* tty is writable */ time_t loginat; /* time of (last) login */ time_t idletime; /* how long idle (if logged in) */ - char tty[UT_LINESIZE+1]; /* null terminated tty line */ - char host[UT_HOSTSIZE+1]; /* null terminated remote host name */ + char tty[sizeof ((struct utmpx *)0)->ut_line]; /* tty line */ + char host[sizeof ((struct utmpx *)0)->ut_host]; /* host name */ } WHERE; #define UNPRIV_NAME "nobody" /* Preferred privilege level */ |