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

Diff for /src/usr.bin/ssh/readconf.c between version 1.218 and 1.219

version 1.218, 2014/02/23 20:11:36 version 1.219, 2014/04/23 12:42:34
Line 336 
Line 336 
     int userprovided)      int userprovided)
 {  {
         char *path;          char *path;
           int i;
   
         if (options->num_identity_files >= SSH_MAX_IDENTITY_FILES)          if (options->num_identity_files >= SSH_MAX_IDENTITY_FILES)
                 fatal("Too many identity files specified (max %d)",                  fatal("Too many identity files specified (max %d)",
Line 345 
Line 346 
                 path = xstrdup(filename);                  path = xstrdup(filename);
         else          else
                 (void)xasprintf(&path, "%.100s%.100s", dir, filename);                  (void)xasprintf(&path, "%.100s%.100s", dir, filename);
   
           /* Avoid registering duplicates */
           for (i = 0; i < options->num_identity_files; i++) {
                   if (options->identity_file_userprovided[i] == userprovided &&
                       strcmp(options->identity_files[i], path) == 0) {
                           debug2("%s: ignoring duplicate key %s", __func__, path);
                           free(path);
                           return;
                   }
           }
   
         options->identity_file_userprovided[options->num_identity_files] =          options->identity_file_userprovided[options->num_identity_files] =
             userprovided;              userprovided;

Legend:
Removed from v.1.218  
changed lines
  Added in v.1.219