summaryrefslogtreecommitdiff
path: root/src/port/exec.c
diff options
context:
space:
mode:
authorBruce Momjian2004-05-19 04:36:33 +0000
committerBruce Momjian2004-05-19 04:36:33 +0000
commitdbb9aa224eb531ccdaab031847b60753f5b11fe0 (patch)
treec966697396d1729e2b64591c83b101f59c8afdea /src/port/exec.c
parent132d09054ee1b6d91514b3f56c4e3f64d348470c (diff)
Supress verbose stderr messages while trying to find my exec path.
Per report from Christopher.
Diffstat (limited to 'src/port/exec.c')
-rw-r--r--src/port/exec.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/port/exec.c b/src/port/exec.c
index baa655c2ff0..ae39c5936b3 100644
--- a/src/port/exec.c
+++ b/src/port/exec.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/port/exec.c,v 1.8 2004/05/18 20:18:59 momjian Exp $
+ * $PostgreSQL: pgsql/src/port/exec.c,v 1.9 2004/05/19 04:36:33 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -92,16 +92,10 @@ validate_exec(char *path)
* instead of the underlying file, you lose.
*/
if (stat(path, &buf) < 0)
- {
- fprintf(stderr, "could not stat \"%s\": %m", path);
return -1;
- }
if ((buf.st_mode & S_IFMT) != S_IFREG)
- {
- fprintf(stderr, "\"%s\" is not a regular file", path);
return -1;
- }
/*
* Ensure that we are using an authorized executable.
@@ -123,8 +117,6 @@ validate_exec(char *path)
{
is_r = buf.st_mode & S_IRUSR;
is_x = buf.st_mode & S_IXUSR;
- if (!(is_r && is_x))
- fprintf(stderr, "\"%s\" is not user read/execute", path);
return is_x ? (is_r ? 0 : -2) : -1;
}
@@ -152,8 +144,6 @@ validate_exec(char *path)
{
is_r = buf.st_mode & S_IRGRP;
is_x = buf.st_mode & S_IXGRP;
- if (!(is_r && is_x))
- fprintf(stderr, "\"%s\" is not group read/execute", path);
return is_x ? (is_r ? 0 : -2) : -1;
}
}
@@ -161,8 +151,6 @@ validate_exec(char *path)
/* Check "other" bits */
is_r = buf.st_mode & S_IROTH;
is_x = buf.st_mode & S_IXOTH;
- if (!(is_r && is_x))
- fprintf(stderr, "\"%s\" is not other read/execute", path);
return is_x ? (is_r ? 0 : -2) : -1;
#endif