held open for a verify callout. Previously this wan not accounted for
and a corrupt onward SMTP conversation resulted.
held open for a verify callout. Previously this wan not accounted for
and a corrupt onward SMTP conversation resulted.
+JH/13 Fix dsearch "subdir" filter to ignore ".". Previously only ".." was
+ excluded, not matching the documentation.
&& S_ISDIR(statbuf.st_mode)
&& ( flags & FILTER_DIR
|| keystring[0] != '.'
&& S_ISDIR(statbuf.st_mode)
&& ( flags & FILTER_DIR
|| keystring[0] != '.'
- || keystring[1] != '.'
- || keystring[1] && keystring[2]
+ || keystring[1] && keystring[1] != '.'
) ) ) )
{
/* Since the filename exists in the filesystem, we can return a
) ) ) )
{
/* Since the filename exists in the filesystem, we can return a
-if (errno == ENOENT) return FAIL;
+if (errno == ENOENT || errno == 0) return FAIL;
-*errmsg = string_sprintf("%s: lstat failed", filename);
+*errmsg = string_sprintf("%s: lstat: %s", filename, strerror(errno));
errno = save_errno;
return DEFER;
}
errno = save_errno;
return DEFER;
}
ok,dir: ${lookup{TESTNUM.dir} dsearch,filter=dir {DIR/aux-fixed}{$value}{FAIL}}
fail,dir: ${lookup{TESTNUM.tst} dsearch,filter=dir {DIR/aux-fixed}{$value}{FAIL}}
ok,subdir: ${lookup{TESTNUM.dir} dsearch,filter=subdir {DIR/aux-fixed}{$value}{FAIL}}
ok,dir: ${lookup{TESTNUM.dir} dsearch,filter=dir {DIR/aux-fixed}{$value}{FAIL}}
fail,dir: ${lookup{TESTNUM.tst} dsearch,filter=dir {DIR/aux-fixed}{$value}{FAIL}}
ok,subdir: ${lookup{TESTNUM.dir} dsearch,filter=subdir {DIR/aux-fixed}{$value}{FAIL}}
-fail,subdir:${lookup{..} dsearch,filter=subdir {DIR/aux-fixed}{$value}{FAIL}}
-fail,subdir:${lookup{TESTNUM.tst} dsearch,filter=subdir {DIR/aux-fixed}{$value}{FAIL}}
+fail,subdir(..):${lookup{..} dsearch,filter=subdir {DIR/aux-fixed}{$value}{FAIL}}
+fail,subdir(.) :${lookup{.} dsearch,filter=subdir {DIR/aux-fixed}{$value}{FAIL}}
+fail,subdir(f) :${lookup{TESTNUM.tst} dsearch,filter=subdir {DIR/aux-fixed}{$value}{FAIL}}
> ok,dir: 2500.dir
> fail,dir: FAIL
> ok,subdir: 2500.dir
> ok,dir: 2500.dir
> fail,dir: FAIL
> ok,subdir: 2500.dir
-> fail,subdir:FAIL
-> fail,subdir:FAIL
+> fail,subdir(..):FAIL
+> fail,subdir(.) :FAIL
+> fail,subdir(f) :FAIL