Commit f5982013 authored by Bruce Momjian's avatar Bruce Momjian

Noticed a small bug in the code. Probably been there for some time. Note

that the original code would consider things like UNIX domain sockets are
regular files.

Gavin Sherry
parent fae69dd1
......@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/init/Attic/findbe.c,v 1.21 2001/04/21 18:29:29 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/init/Attic/findbe.c,v 1.22 2001/05/09 19:28:31 momjian Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -74,7 +74,9 @@ ValidateBinary(char *path)
path);
return -1;
}
if (!(buf.st_mode & S_IFREG))
if ((buf.st_mode & S_IFMT) != S_IFREG)
{
if (DebugLvl > 1)
fprintf(stderr, "ValidateBinary: \"%s\" is not a regular file\n",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment