dovecot-sieve-1.1: If sieve path is a directory instead of a fil...
dovecot at dovecot.org
dovecot at dovecot.org
Fri May 16 16:10:58 EEST 2008
details: http://hg.dovecot.org/dovecot-sieve-1.1/rev/25b786f5b3c0
changeset: 56:25b786f5b3c0
user: Timo Sirainen <tss at iki.fi>
date: Fri May 16 16:10:53 2008 +0300
description:
If sieve path is a directory instead of a file, give a clear error message
instead of "input in flex scanner failed".
diffstat:
1 file changed, 4 insertions(+)
src/sieve-cmu.c | 4 ++++
diffs (14 lines):
diff -r 486736da7e4c -r 25b786f5b3c0 src/sieve-cmu.c
--- a/src/sieve-cmu.c Fri Apr 25 02:54:14 2008 +0300
+++ b/src/sieve-cmu.c Fri May 16 16:10:53 2008 +0300
@@ -916,6 +916,10 @@ dovecot_sieve_compile(script_data_t *sda
i_error("stat(%s) failed: %m", script_path);
return -1;
}
+ if (S_ISDIR(st.st_mode)) {
+ i_error("%s should be a file, not a directory", script_path);
+ return -1;
+ }
if (stat(compiled_path, &st2) < 0) {
if (errno != ENOENT) {
i_error("stat(%s) failed: %m", script_path);
More information about the dovecot-cvs
mailing list