Browse Source

* Add checking of tempdir (ported from rpop)

rspamd-0.5
Vsevolod Stakhov 18 years ago
parent
commit
5014f7e7cb
  1. 10
      cfg_file.y

10
cfg_file.y

@ -80,6 +80,16 @@ command :
tempdir :
TEMPDIR EQSIGN QUOTEDSTRING {
struct stat st;
if (stat ($3, &st) == -1) {
yyerror ("yyparse: cannot stat directory \"%s\": %s", $3, strerror (errno));
YYERROR;
}
if (!S_ISDIR (st.st_mode)) {
yyerror ("yyparse: \"%s\" is not a directory", $3);
YYERROR;
}
cfg->temp_dir = $3;
}
;

Loading…
Cancel
Save