Mailing List Archive

[Bug 503] New: dsearch: use lstat() instead of stat()
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

http://www.exim.org/bugzilla/show_bug.cgi?id=503

Summary: dsearch: use lstat() instead of stat()
Product: Exim
Version: 4.63
Platform: x86
OS/Version: Linux
Status: NEW
Severity: bug
Priority: medium
Component: Lookups
AssignedTo: ph10@hermes.cam.ac.uk
ReportedBy: mail@peter-thomassen.de
QAContact: exim-dev@exim.org


The specification says for the dsearch lookup:
| dsearch: The given file must be a directory; this is searched for a file
| whose name is the key. The key may not contain any forward slash
| characters. The result of a successful lookup is the name of the file.

I wanted to use dsearch and found that, if the directory contains symbolic
links, the link targets are inspected (instead of the links itself). I ran into
this because in my installation, the Exim user doesn't have any permissions for
the link target, even though there is a link in the directory whose name is the
key. The lookup didn't match in any case.

This is caused by the Ustat() call in src/lookups/dsearch.c:96 that should be
an Ulstat() call (referring to the 4.67 sources).

--
Configure bugmail: http://www.exim.org/bugzilla/userprefs.cgi?tab=email

--
## List details at http://www.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##