77 *
88 *
99 * IDENTIFICATION
10- * $PostgreSQL: pgsql/src/port/exec.c,v 1.8 2004/05/18 20:18:59 momjian Exp $
10+ * $PostgreSQL: pgsql/src/port/exec.c,v 1.9 2004/05/19 04:36:33 momjian Exp $
1111 *
1212 *-------------------------------------------------------------------------
1313 */
@@ -92,16 +92,10 @@ validate_exec(char *path)
9292 * instead of the underlying file, you lose.
9393 */
9494if (stat (path ,& buf )< 0 )
95- {
96- fprintf (stderr ,"could not stat \"%s\": %m" ,path );
9795return -1 ;
98- }
9996
10097if ((buf .st_mode & S_IFMT )!= S_IFREG )
101- {
102- fprintf (stderr ,"\"%s\" is not a regular file" ,path );
10398return -1 ;
104- }
10599
106100/*
107101 * Ensure that we are using an authorized executable.
@@ -123,8 +117,6 @@ validate_exec(char *path)
123117{
124118is_r = buf .st_mode & S_IRUSR ;
125119is_x = buf .st_mode & S_IXUSR ;
126- if (!(is_r && is_x ))
127- fprintf (stderr ,"\"%s\" is not user read/execute" ,path );
128120return is_x ? (is_r ?0 :-2 ) :-1 ;
129121}
130122
@@ -152,17 +144,13 @@ validate_exec(char *path)
152144{
153145is_r = buf .st_mode & S_IRGRP ;
154146is_x = buf .st_mode & S_IXGRP ;
155- if (!(is_r && is_x ))
156- fprintf (stderr ,"\"%s\" is not group read/execute" ,path );
157147return is_x ? (is_r ?0 :-2 ) :-1 ;
158148}
159149}
160150
161151/* Check "other" bits */
162152is_r = buf .st_mode & S_IROTH ;
163153is_x = buf .st_mode & S_IXOTH ;
164- if (!(is_r && is_x ))
165- fprintf (stderr ,"\"%s\" is not other read/execute" ,path );
166154return is_x ? (is_r ?0 :-2 ) :-1 ;
167155
168156#endif