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

Diff for /src/usr.bin/ssh/auth.c between version 1.11.2.5 and 1.11.2.6

version 1.11.2.5, 2001/09/27 00:15:41 version 1.11.2.6, 2001/11/15 00:14:59
Line 311 
Line 311 
     char *err, size_t errlen)      char *err, size_t errlen)
 {  {
         uid_t uid = pw->pw_uid;          uid_t uid = pw->pw_uid;
         char buf[MAXPATHLEN];          char buf[MAXPATHLEN], homedir[MAXPATHLEN];
         char *cp;          char *cp;
         struct stat st;          struct stat st;
   
Line 320 
Line 320 
                     strerror(errno));                      strerror(errno));
                 return -1;                  return -1;
         }          }
           if (realpath(pw->pw_dir, homedir) == NULL) {
                   snprintf(err, errlen, "realpath %s failed: %s", pw->pw_dir,
                       strerror(errno));
                   return -1;
           }
   
         /* check the open file to avoid races */          /* check the open file to avoid races */
         if (fstat(fileno(f), &st) < 0 ||          if (fstat(fileno(f), &st) < 0 ||
Line 348 
Line 353 
                 }                  }
   
                 /* If are passed the homedir then we can stop */                  /* If are passed the homedir then we can stop */
                 if (strcmp(pw->pw_dir, buf) == 0) {                  if (strcmp(homedir, buf) == 0) {
                         debug3("secure_filename: terminating check at '%s'",                          debug3("secure_filename: terminating check at '%s'",
                             buf);                              buf);
                         break;                          break;

Legend:
Removed from v.1.11.2.5  
changed lines
  Added in v.1.11.2.6