/[imapfilter]/imapfilter/parse.c
ViewVC logotype

Diff of /imapfilter/parse.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.14 by lefcha, Fri Feb 13 23:44:50 2004 UTC revision 1.15 by lefcha, Sat Feb 14 19:14:43 2004 UTC
# Line 182  parse_config(FILE * fd) Line 182  parse_config(FILE * fd)
182                  /* Skip variable processing. */                  /* Skip variable processing. */
183                  else if (!regexec(&creg[10], line, 4, match, 0) ||                  else if (!regexec(&creg[10], line, 4, match, 0) ||
184                              !regexec(&creg[11], line, 4, match, 0) ||                              !regexec(&creg[11], line, 4, match, 0) ||
185                      !regexec(&creg[12], line, 4, match, 0));                      !regexec(&creg[12], line, 4, match, 0))
186                            continue;
187                  else                  else
188                          return row;                          return row;
189    
# Line 229  set_options(char *line, regmatch_t * m) Line 230  set_options(char *line, regmatch_t * m)
230                              *(line + m[3].rm_eo - 1) == '"')                              *(line + m[3].rm_eo - 1) == '"')
231                                  strncat(opts.logfile, line + m[3].rm_so + 1,                                  strncat(opts.logfile, line + m[3].rm_so + 1,
232                                      min((m[3].rm_eo - m[3].rm_so - 2),                                      min((m[3].rm_eo - m[3].rm_so - 2),
233                                          PATH_MAX - 1));                                      PATH_MAX - 1));
234                          else                          else
235                                  strncat(opts.logfile, line + m[3].rm_so,                                  strncat(opts.logfile, line + m[3].rm_so,
236                                      min((m[3].rm_eo - m[3].rm_so),                                      min((m[3].rm_eo - m[3].rm_so),
237                                          PATH_MAX - 1));                                      PATH_MAX - 1));
238                  }                  }
239          } else if (!strncasecmp(line + m[2].rm_so, "charset", 7)) {          } else if (!strncasecmp(line + m[2].rm_so, "charset", 7)) {
240                  if (*(line + m[3].rm_so) == '"' &&                  if (*(line + m[3].rm_so) == '"' &&
241                      *(line + m[3].rm_eo - 1) == '"')                      *(line + m[3].rm_eo - 1) == '"')
242                          strncat(opts.charset, line + m[3].rm_so + 1,                          strncat(opts.charset, line + m[3].rm_so + 1,
243                              min((m[3].rm_eo - m[3].rm_so - 2),                              min((m[3].rm_eo - m[3].rm_so - 2),
244                                  CHARSET_LEN - 1));                              CHARSET_LEN - 1));
245                  else                  else
246                          strncat(opts.charset, line + m[3].rm_so,                          strncat(opts.charset, line + m[3].rm_so,
247                              min((m[3].rm_eo - m[3].rm_so), CHARSET_LEN - 1));                              min((m[3].rm_eo - m[3].rm_so), CHARSET_LEN - 1));
# Line 328  read_passwords(void) Line 329  read_passwords(void)
329    
330    
331  /*  /*
332   *  Parse unencrypted password file.   * Parse unencrypted password file.
333   */   */
334  int  int
335  parse_passwords(FILE * fd)  parse_passwords(FILE * fd)
# Line 375  parse_passwords(FILE * fd) Line 376  parse_passwords(FILE * fd)
376                  if ((pe = (char *)find_password(user, serv)))                  if ((pe = (char *)find_password(user, serv)))
377                          strncat(pe, line + match[3].rm_so,                          strncat(pe, line + match[3].rm_so,
378                              min(match[3].rm_eo - match[3].rm_so,                              min(match[3].rm_eo - match[3].rm_so,
379                                  PASS_LEN - 1));                              PASS_LEN - 1));
380    
381                  line = strtok_r(NULL, "\n", &c);                  line = strtok_r(NULL, "\n", &c);
382          }          }

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26