Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit f598201

Browse files
committed
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
1 parent fae69dd commit f598201

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/backend/utils/init/findbe.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/init/Attic/findbe.c,v 1.21 2001/04/21 18:29:29 tgl Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/init/Attic/findbe.c,v 1.22 2001/05/09 19:28:31 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -74,7 +74,9 @@ ValidateBinary(char *path)
7474
path);
7575
return -1;
7676
}
77-
if (!(buf.st_mode & S_IFREG))
77+
78+
79+
if ((buf.st_mode & S_IFMT) != S_IFREG)
7880
{
7981
if (DebugLvl > 1)
8082
fprintf(stderr, "ValidateBinary: \"%s\" is not a regular file\n",

0 commit comments

Comments
 (0)