mirror of
git://anongit.mindrot.org/openssh.git
synced 2024-11-24 02:02:10 +08:00
- deraadt@cvs.openbsd.org 2006/03/25 18:36:15
[sshlogin.c sshlogin.h] nicer size_t and time_t types
This commit is contained in:
parent
90fdfaf69c
commit
a1690d08b4
@ -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 $
|
||||
|
@ -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 <ylo@cs.hut.fi>
|
||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, 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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -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 <ylo@cs.hut.fi>
|
||||
@ -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 *,
|
||||
|
Loading…
Reference in New Issue
Block a user