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

Diff of /imapfilter/parse.c

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

revision 1.9 by lefcha, Mon Feb 9 17:34:56 2004 UTC revision 1.10 by lefcha, Mon Feb 9 18:23:49 2004 UTC
# Line 51  read_config(char *cfg) Line 51  read_config(char *cfg)
51          }          }
52          debug("configuration file: '%s'\n", cfg);          debug("configuration file: '%s'\n", cfg);
53    
54            check_file_perms(cfg, S_IRUSR | S_IWUSR);
55    
56          fd = fopen(cfg, "r");          fd = fopen(cfg, "r");
57          if (fd == NULL)          if (fd == NULL)
58                  fatal(ERROR_FILE_OPEN, "opening config file %s; %s\n", cfg,                  fatal(ERROR_FILE_OPEN, "opening config file %s; %s\n", cfg,
# Line 65  read_config(char *cfg) Line 67  read_config(char *cfg)
67    
68          fclose(fd);          fclose(fd);
69    
         check_file_perms(cfg, S_IRUSR | S_IWUSR);  
   
70          debug("options: %0#10x '%s'\n", options, charset);          debug("options: %0#10x '%s'\n", options, charset);
71    
72          return 0;          return 0;
# Line 138  parse_config(FILE * fd) Line 138  parse_config(FILE * fd)
138                  "[[:blank:]]*\n$",                  "[[:blank:]]*\n$",
139    
140                  "^[[:blank:]]*(SET[[:blank:]])?[[:blank:]]*(ERRORS|EXPUNGE|"                  "^[[:blank:]]*(SET[[:blank:]])?[[:blank:]]*(ERRORS|EXPUNGE|"
141                  "HEADERS|NAMESPACE|PEEK|PERMISSIONS|PROTOCOL|SUBSCRIBE)"                  "HEADERS|NAMESPACE|PEEK|SUBSCRIBE)[[:blank:]]*=[[:blank:]]*"
142                  "[[:blank:]]*=[[:blank:]]*(YES|NO)[[:blank:]]*\n$",                  "(YES|NO)[[:blank:]]*\n$",
143    
144                  "^[[:blank:]]*(SET[[:blank:]])?[[:blank:]]*(DAEMON|TIMEOUT)"                  "^[[:blank:]]*(SET[[:blank:]])?[[:blank:]]*(DAEMON|TIMEOUT)"
145                  "[[:blank:]]*=[[:blank:]]*([[:digit:]]+)\n$"                  "[[:blank:]]*=[[:blank:]]*([[:digit:]]+)\n$"
# Line 271  set_options(char *line, regmatch_t * m) Line 271  set_options(char *line, regmatch_t * m)
271                          options |= OPTION_PEEK;                          options |= OPTION_PEEK;
272                  else                  else
273                          options &= ~(OPTION_PEEK);                          options &= ~(OPTION_PEEK);
         } else if (!strncasecmp(line + m[2].rm_so, "permissions", 8)) {  
                 if (!strncasecmp(line + m[3].rm_so, "yes", 3))  
                         options |= OPTION_PERMISSIONS;  
                 else  
                         options &= ~(OPTION_PERMISSIONS);  
274          } else if (!strncasecmp(line + m[2].rm_so, "subscribe", 9)) {          } else if (!strncasecmp(line + m[2].rm_so, "subscribe", 9)) {
275                  if (!strncasecmp(line + m[3].rm_so, "yes", 3))                  if (!strncasecmp(line + m[3].rm_so, "yes", 3))
276                          options |= OPTION_SUBSCRIBE;                          options |= OPTION_SUBSCRIBE;

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26