magnus 2007/05/31 13:42:07 BST
Modified files:
exim-src/src/lookups dsearch.c
Log:
Bug #503: Use Ulstat() instead of Ustat() in dsearch lookup.
Revision Changes Path
1.5 +6 -6 exim/exim-src/src/lookups/dsearch.c
Index: dsearch.c
===================================================================
RCS file: /home/cvs/exim/exim-src/src/lookups/dsearch.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- dsearch.c 8 Jan 2007 10:50:19 -0000 1.4
+++ dsearch.c 31 May 2007 12:42:07 -0000 1.5
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/exim-src/src/lookups/dsearch.c,v 1.4 2007/01/08 10:50:19 ph10 Exp $ */
+/* $Cambridge: exim/exim-src/src/lookups/dsearch.c,v 1.5 2007/05/31 12:42:07 magnus Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -8,8 +8,8 @@
/* See the file NOTICE for conditions of use and distribution. */
/* The idea for this code came from Matthew Byng-Maddick, but his original has
-been heavily reworked a lot for Exim 4 (and it now uses stat() rather than a
-directory scan). */
+been heavily reworked a lot for Exim 4 (and it now uses stat() (more precisely:
+lstat()) rather than a directory scan). */
#include "../exim.h"
@@ -24,7 +24,7 @@
/* See local README for interface description. We open the directory to test
whether it exists and whether it is searchable. However, we don't need to keep
-it open, because the "search" can be done by a call to stat() rather than
+it open, because the "search" can be done by a call to lstat() rather than
actually scanning through the list of files. */
void *
@@ -64,7 +64,7 @@
* Find entry point *
*************************************************/
-/* See local README for interface description. We use stat() instead of
+/* See local README for interface description. We use lstat() instead of
scanning the directory, as it is hopefully faster to let the OS do the scanning
for us. */
@@ -93,7 +93,7 @@
return DEFER;
}
-if (Ustat(filename, &statbuf) >= 0)
+if (Ulstat(filename, &statbuf) >= 0)
{
*result = string_copy(keystring);
return OK;
@@ -102,7 +102,7 @@
if (errno == ENOENT) return FAIL;
save_errno = errno;
-*errmsg = string_sprintf("%s: stat failed", filename);
+*errmsg = string_sprintf("%s: lstat failed", filename);
errno = save_errno;
return DEFER;
}