diff --git a/ChangeLog b/ChangeLog index 8c859c205..5efa17b7c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -156,6 +156,9 @@ - deraadt@cvs.openbsd.org 2006/03/25 18:30:55 [clientloop.c serverloop.c] spacing + - deraadt@cvs.openbsd.org 2006/03/25 18:36:15 + [sshlogin.c sshlogin.h] + nicer size_t and time_t types 20060325 - OpenBSD CVS Sync @@ -4413,4 +4416,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4279 2006/03/26 03:25:37 djm Exp $ +$Id: ChangeLog,v 1.4280 2006/03/26 03:27:35 djm Exp $ diff --git a/sshlogin.c b/sshlogin.c index 72c8252d1..4f65b5e91 100644 --- a/sshlogin.c +++ b/sshlogin.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshlogin.c,v 1.16 2006/03/25 13:17:03 djm Exp $ */ +/* $OpenBSD: sshlogin.c,v 1.17 2006/03/25 18:36:15 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -54,15 +54,15 @@ extern ServerOptions options; * information is not available. This must be called before record_login. * The host the user logged in from will be returned in buf. */ -u_long +time_t get_last_login_time(uid_t uid, const char *logname, - char *buf, u_int bufsize) + char *buf, size_t bufsize) { struct logininfo li; login_get_lastlog(&li, uid); strlcpy(buf, li.hostname, bufsize); - return li.tv_sec; + return (time_t)li.tv_sec; } /* diff --git a/sshlogin.h b/sshlogin.h index 1c8bfad32..a3d0dd492 100644 --- a/sshlogin.h +++ b/sshlogin.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sshlogin.h,v 1.4 2002/08/29 15:57:25 stevesk Exp $ */ +/* $OpenBSD: sshlogin.h,v 1.5 2006/03/25 18:36:15 deraadt Exp $ */ /* * Author: Tatu Ylonen @@ -14,11 +14,10 @@ #ifndef SSHLOGIN_H #define SSHLOGIN_H -void -record_login(pid_t, const char *, const char *, uid_t, +void record_login(pid_t, const char *, const char *, uid_t, const char *, struct sockaddr *, socklen_t); void record_logout(pid_t, const char *, const char *); -u_long get_last_login_time(uid_t, const char *, char *, u_int); +time_t get_last_login_time(uid_t, const char *, char *, u_int); #ifdef LOGIN_NEEDS_UTMPX void record_utmp_only(pid_t, const char *, const char *, const char *,