[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.45 and 1.45.2.1

version 1.45, 2002/09/20 18:41:29 version 1.45.2.1, 2003/04/01 00:12:13
Line 340 
Line 340 
         uid_t uid = pw->pw_uid;          uid_t uid = pw->pw_uid;
         char buf[MAXPATHLEN], homedir[MAXPATHLEN];          char buf[MAXPATHLEN], homedir[MAXPATHLEN];
         char *cp;          char *cp;
           int comparehome = 0;
         struct stat st;          struct stat st;
   
         if (realpath(file, buf) == NULL) {          if (realpath(file, buf) == NULL) {
Line 347 
Line 348 
                     strerror(errno));                      strerror(errno));
                 return -1;                  return -1;
         }          }
         if (realpath(pw->pw_dir, homedir) == NULL) {          if (realpath(pw->pw_dir, homedir) != NULL)
                 snprintf(err, errlen, "realpath %s failed: %s", pw->pw_dir,                  comparehome = 1;
                     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 380 
Line 378 
                 }                  }
   
                 /* If are passed the homedir then we can stop */                  /* If are passed the homedir then we can stop */
                 if (strcmp(homedir, buf) == 0) {                  if (comparehome && 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.45  
changed lines
  Added in v.1.45.2.1