[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.6.1 and 1.14

version 1.13.6.1, 2006/10/06 03:19:33 version 1.14, 2006/03/19 18:51:19
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 39 
Line 38 
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.   * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */   */
   
 #include <sys/types.h>  #include "includes.h"
 #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 66 
Line 55 
  * 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.
  */   */
 time_t  u_long
 get_last_login_time(uid_t uid, const char *logname,  get_last_login_time(uid_t uid, const char *logname,
     char *buf, size_t bufsize)      char *buf, u_int bufsize)
 {  {
         struct lastlog ll;          struct lastlog ll;
         char *lastlog;          char *lastlog;
Line 101 
Line 90 
                 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 (time_t)ll.ll_time;          return ll.ll_time;
 }  }
   
 /*  /*
Line 140 
Line 129 
  */   */
 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.6.1  
changed lines
  Added in v.1.14