[BACK]Return to sshlogin.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/sshlogin.c between version 1.13 and 1.13.8.1

version 1.13, 2004/08/12 09:18:24 version 1.13.8.1, 2006/09/30 04:06:51
Line 1 
Line 1 
   /* $OpenBSD$ */
 /*  /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>   * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland   * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
Line 38 
Line 39 
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.   * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */   */
   
 #include "includes.h"  #include <sys/types.h>
 RCSID("$OpenBSD$");  #include <sys/param.h>
   #include <sys/socket.h>
   
   #include <errno.h>
   #include <fcntl.h>
   #include <stdio.h>
   #include <string.h>
   #include <time.h>
   #include <unistd.h>
 #include <util.h>  #include <util.h>
 #include <utmp.h>  #include <utmp.h>
   #include <stdarg.h>
   
 #include "sshlogin.h"  #include "sshlogin.h"
 #include "log.h"  #include "log.h"
 #include "buffer.h"  #include "buffer.h"
Line 56 
Line 66 
  * information is not available.  This must be called before record_login.   * information is not available.  This must be called before record_login.
  * The host the user logged in from will be returned in buf.   * 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,  get_last_login_time(uid_t uid, const char *logname,
     char *buf, u_int bufsize)      char *buf, size_t bufsize)
 {  {
         struct lastlog ll;          struct lastlog ll;
         char *lastlog;          char *lastlog;
Line 91 
Line 101 
                 bufsize = sizeof(ll.ll_host) + 1;                  bufsize = sizeof(ll.ll_host) + 1;
         strncpy(buf, ll.ll_host, bufsize - 1);          strncpy(buf, ll.ll_host, bufsize - 1);
         buf[bufsize - 1] = '\0';          buf[bufsize - 1] = '\0';
         return ll.ll_time;          return (time_t)ll.ll_time;
 }  }
   
 /*  /*
Line 130 
Line 140 
  */   */
 void  void
 record_login(pid_t pid, const char *tty, const char *user, uid_t uid,  record_login(pid_t pid, const char *tty, const char *user, uid_t uid,
     const char *host, struct sockaddr * addr, socklen_t addrlen)      const char *host, struct sockaddr *addr, socklen_t addrlen)
 {  {
         int fd;          int fd;
         struct lastlog ll;          struct lastlog ll;

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.13.8.1