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

Diff for /src/usr.bin/ssh/session.c between version 1.34 and 1.35

version 1.34, 2000/09/04 19:06:03 version 1.35, 2000/09/04 19:07:21
Line 602 
Line 602 
         FILE *f;          FILE *f;
         char *time_string;          char *time_string;
         char buf[256];          char buf[256];
           char hostname[MAXHOSTNAMELEN];
         socklen_t fromlen;          socklen_t fromlen;
         struct sockaddr_storage from;          struct sockaddr_storage from;
         struct stat st;          struct stat st;
Line 623 
Line 624 
                 }                  }
         }          }
   
           /* Get the time and hostname when the user last logged in. */
           last_login_time = get_last_login_time(pw->pw_uid, pw->pw_name,
               hostname, sizeof(hostname));
   
         /* Record that there was a login on that tty from the remote host. */          /* Record that there was a login on that tty from the remote host. */
         record_login(pid, s->tty, pw->pw_name, pw->pw_uid,          record_login(pid, s->tty, pw->pw_name, pw->pw_uid,
             get_remote_name_or_ip(), (struct sockaddr *)&from);              get_remote_name_or_ip(), (struct sockaddr *)&from);
Line 635 
Line 640 
         if (stat(buf, &st) >= 0)          if (stat(buf, &st) >= 0)
 #endif  #endif
                 return;                  return;
         /*  
          * Get the time when the user last logged in.  'buf' will be set  
          * to contain the hostname the last login was from.  
          */  
         last_login_time = get_last_login_time(pw->pw_uid, pw->pw_name,  
             buf, sizeof(buf));  
         if (last_login_time != 0) {          if (last_login_time != 0) {
                 time_string = ctime(&last_login_time);                  time_string = ctime(&last_login_time);
                 if (strchr(time_string, '\n'))                  if (strchr(time_string, '\n'))

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.35