summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--sshlogin.c8
-rw-r--r--sshlogin.h7
3 files changed, 11 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 8c859c205..5efa17b7c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -156,6 +156,9 @@
156 - deraadt@cvs.openbsd.org 2006/03/25 18:30:55 156 - deraadt@cvs.openbsd.org 2006/03/25 18:30:55
157 [clientloop.c serverloop.c] 157 [clientloop.c serverloop.c]
158 spacing 158 spacing
159 - deraadt@cvs.openbsd.org 2006/03/25 18:36:15
160 [sshlogin.c sshlogin.h]
161 nicer size_t and time_t types
159 162
16020060325 16320060325
161 - OpenBSD CVS Sync 164 - OpenBSD CVS Sync
@@ -4413,4 +4416,4 @@
4413 - (djm) Trim deprecated options from INSTALL. Mention UsePAM 4416 - (djm) Trim deprecated options from INSTALL. Mention UsePAM
4414 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu 4417 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
4415 4418
4416$Id: ChangeLog,v 1.4279 2006/03/26 03:25:37 djm Exp $ 4419$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 @@
1/* $OpenBSD: sshlogin.c,v 1.16 2006/03/25 13:17:03 djm Exp $ */ 1/* $OpenBSD: sshlogin.c,v 1.17 2006/03/25 18:36:15 deraadt Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -54,15 +54,15 @@ extern ServerOptions options;
54 * information is not available. This must be called before record_login. 54 * information is not available. This must be called before record_login.
55 * The host the user logged in from will be returned in buf. 55 * The host the user logged in from will be returned in buf.
56 */ 56 */
57u_long 57time_t
58get_last_login_time(uid_t uid, const char *logname, 58get_last_login_time(uid_t uid, const char *logname,
59 char *buf, u_int bufsize) 59 char *buf, size_t bufsize)
60{ 60{
61 struct logininfo li; 61 struct logininfo li;
62 62
63 login_get_lastlog(&li, uid); 63 login_get_lastlog(&li, uid);
64 strlcpy(buf, li.hostname, bufsize); 64 strlcpy(buf, li.hostname, bufsize);
65 return li.tv_sec; 65 return (time_t)li.tv_sec;
66} 66}
67 67
68/* 68/*
diff --git a/sshlogin.h b/sshlogin.h
index 1c8bfad32..a3d0dd492 100644
--- a/sshlogin.h
+++ b/sshlogin.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshlogin.h,v 1.4 2002/08/29 15:57:25 stevesk Exp $ */ 1/* $OpenBSD: sshlogin.h,v 1.5 2006/03/25 18:36:15 deraadt Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -14,11 +14,10 @@
14#ifndef SSHLOGIN_H 14#ifndef SSHLOGIN_H
15#define SSHLOGIN_H 15#define SSHLOGIN_H
16 16
17void 17void record_login(pid_t, const char *, const char *, uid_t,
18record_login(pid_t, const char *, const char *, uid_t,
19 const char *, struct sockaddr *, socklen_t); 18 const char *, struct sockaddr *, socklen_t);
20void record_logout(pid_t, const char *, const char *); 19void record_logout(pid_t, const char *, const char *);
21u_long get_last_login_time(uid_t, const char *, char *, u_int); 20time_t get_last_login_time(uid_t, const char *, char *, u_int);
22 21
23#ifdef LOGIN_NEEDS_UTMPX 22#ifdef LOGIN_NEEDS_UTMPX
24void record_utmp_only(pid_t, const char *, const char *, const char *, 23void record_utmp_only(pid_t, const char *, const char *, const char *,