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

Diff for /src/usr.bin/ssh/auth-rhosts.c between version 1.2 and 1.3

version 1.2, 1999/09/28 04:45:35 version 1.3, 1999/09/29 21:14:15
Line 86 
Line 86 
           continue; /* Empty line? */            continue; /* Empty line? */
         case 1:          case 1:
           /* Host name only. */            /* Host name only. */
           strncpy(userbuf, server_user, sizeof(userbuf));            strlcpy(userbuf, server_user, sizeof(userbuf));
           userbuf[sizeof(userbuf) - 1] = 0;  
           break;            break;
         case 2:          case 2:
           /* Got both host and user name. */            /* Got both host and user name. */
Line 207 
Line 206 
        rhosts_file_index++)         rhosts_file_index++)
     {      {
       /* Check users .rhosts or .shosts. */        /* Check users .rhosts or .shosts. */
       sprintf(buf, "%.500s/%.100s",        snprintf(buf, sizeof buf, "%.500s/%.100s",
               pw->pw_dir, rhosts_files[rhosts_file_index]);                pw->pw_dir, rhosts_files[rhosts_file_index]);
       if (stat(buf, &st) >= 0)        if (stat(buf, &st) >= 0)
         break;          break;
Line 286 
Line 285 
        rhosts_file_index++)         rhosts_file_index++)
     {      {
       /* Check users .rhosts or .shosts. */        /* Check users .rhosts or .shosts. */
       sprintf(buf, "%.500s/%.100s",        snprintf(buf, sizeof buf, "%.500s/%.100s",
               pw->pw_dir, rhosts_files[rhosts_file_index]);                pw->pw_dir, rhosts_files[rhosts_file_index]);
       if (stat(buf, &st) < 0)        if (stat(buf, &st) < 0)
         continue; /* No such file. */          continue; /* No such file. */

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