[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.195 and 1.196

version 1.195, 2013/02/17 23:16:57 version 1.196, 2013/02/22 04:45:08
Line 369 
Line 369 
 int  int
 process_config_line(Options *options, const char *host,  process_config_line(Options *options, const char *host,
                     char *line, const char *filename, int linenum,                      char *line, const char *filename, int linenum,
                     int *activep)                      int *activep, int userconfig)
 {  {
         char *s, **charptr, *endofnumber, *keyword, *arg, *arg2;          char *s, **charptr, *endofnumber, *keyword, *arg, *arg2;
         char **cpptr, fwdarg[256];          char **cpptr, fwdarg[256];
Line 602 
Line 602 
                         if (*intptr >= SSH_MAX_IDENTITY_FILES)                          if (*intptr >= SSH_MAX_IDENTITY_FILES)
                                 fatal("%.200s line %d: Too many identity files specified (max %d).",                                  fatal("%.200s line %d: Too many identity files specified (max %d).",
                                     filename, linenum, SSH_MAX_IDENTITY_FILES);                                      filename, linenum, SSH_MAX_IDENTITY_FILES);
                         add_identity_file(options, NULL, arg, 1);                          add_identity_file(options, NULL, arg, userconfig);
                 }                  }
                 break;                  break;
   
Line 1089 
Line 1089 
   
 int  int
 read_config_file(const char *filename, const char *host, Options *options,  read_config_file(const char *filename, const char *host, Options *options,
     int checkperm)      int flags)
 {  {
         FILE *f;          FILE *f;
         char line[1024];          char line[1024];
Line 1099 
Line 1099 
         if ((f = fopen(filename, "r")) == NULL)          if ((f = fopen(filename, "r")) == NULL)
                 return 0;                  return 0;
   
         if (checkperm) {          if (flags & SSHCONF_CHECKPERM) {
                 struct stat sb;                  struct stat sb;
   
                 if (fstat(fileno(f), &sb) == -1)                  if (fstat(fileno(f), &sb) == -1)
Line 1120 
Line 1120 
         while (fgets(line, sizeof(line), f)) {          while (fgets(line, sizeof(line), f)) {
                 /* Update line number counter. */                  /* Update line number counter. */
                 linenum++;                  linenum++;
                 if (process_config_line(options, host, line, filename, linenum, &active) != 0)                  if (process_config_line(options, host, line, filename, linenum,
                       &active, flags & SSHCONF_USERCONF) != 0)
                         bad_options++;                          bad_options++;
         }          }
         fclose(f);          fclose(f);

Legend:
Removed from v.1.195  
changed lines
  Added in v.1.196