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

Diff for /src/usr.bin/ssh/Attic/login.c between version 1.2 and 1.3

version 1.2, 1999/09/29 18:16:19 version 1.3, 1999/09/29 21:14:16
Line 51 
Line 51 
   int fd;    int fd;
   
 #ifdef _PATH_LASTLOG  #ifdef _PATH_LASTLOG
   sprintf(lastlogfile, "%.200s/%.200s", _PATH_LASTLOG, name);    snprintf(lastlogfile, sizeof lastlogfile, "%.200s/%.200s",
       _PATH_LASTLOG, name);
 #else  #else
 #ifdef LASTLOG_FILE  #ifdef LASTLOG_FILE
   sprintf(lastlogfile, "%.200s/%.200s", LASTLOG_FILE, name);    snprintf(lastlogfile, sizeof lastlogfile, "%.200s/%.200s",
       LASTLOG_FILE, name);
 #else  #else
   sprintf(lastlogfile, "%.200s/%.200s", SSH_LASTLOG, name);    snprintf(lastlogfile, sizeof lastlogfile, "%.200s/%.200s",
       SSH_LASTLOG, name);
 #endif  #endif
 #endif  #endif
   
   strcpy(buf, "");    buf[0] = '\0';
   
   fd = open(lastlogfile, O_RDONLY);    fd = open(lastlogfile, O_RDONLY);
   if (fd < 0)    if (fd < 0)
Line 108 
Line 111 
 #endif  #endif
 #endif  #endif
   
   strcpy(buf, "");    buf[0] = '\0';
   
   fd = open(lastlog, O_RDONLY);    fd = open(lastlog, O_RDONLY);
   if (fd < 0)    if (fd < 0)
Line 337 
Line 340 
       strncpy(ll.ll_line, ttyname + 5, sizeof(ll.ll_line));        strncpy(ll.ll_line, ttyname + 5, sizeof(ll.ll_line));
       strncpy(ll.ll_host, host, sizeof(ll.ll_host));        strncpy(ll.ll_host, host, sizeof(ll.ll_host));
 #ifdef LASTLOG_IS_DIR  #ifdef LASTLOG_IS_DIR
       sprintf(lastlogfile, "%.100s/%.100s", lastlog, user);        snprintf(lastlogfile, sizeof lastlogfile, "%.100s/%.100s",
           lastlog, user);
       fd = open(lastlogfile, O_WRONLY | O_CREAT, 0644);        fd = open(lastlogfile, O_WRONLY | O_CREAT, 0644);
       if (fd >= 0)        if (fd >= 0)
         {          {

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3