37
37
*
38
38
*
39
39
* IDENTIFICATION
40
- * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.311 2003/04/17 22:26:01 tgl Exp $
40
+ * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.312 2003/04/18 01:03:42 momjian Exp $
41
41
*
42
42
* NOTES
43
43
*
@@ -299,9 +299,7 @@ checkDataDir(const char *checkdir)
299
299
char path [MAXPGPATH ];
300
300
FILE * fp ;
301
301
302
- #ifndef __CYGWIN__
303
302
struct stat stat_buf ;
304
- #endif
305
303
306
304
if (checkdir == NULL )
307
305
{
@@ -314,15 +312,6 @@ checkDataDir(const char *checkdir)
314
312
ExitPostmaster (2 );
315
313
}
316
314
317
- /*
318
- * Check if the directory has group or world access. If so, reject.
319
- *
320
- * XXX temporarily suppress check when on Windows, because there may not
321
- * be proper support for Unix-y file permissions. Need to think of a
322
- * reasonable check to apply on Windows.
323
- */
324
- #ifndef __CYGWIN__
325
-
326
315
if (stat (checkdir ,& stat_buf )== -1 )
327
316
{
328
317
if (errno == ENOENT )
@@ -332,10 +321,18 @@ checkDataDir(const char *checkdir)
332
321
checkdir );
333
322
}
334
323
324
+ /*
325
+ * Check if the directory has group or world access. If so, reject.
326
+ *
327
+ * XXX temporarily suppress check when on Windows, because there may not
328
+ * be proper support for Unix-y file permissions. Need to think of a
329
+ * reasonable check to apply on Windows.
330
+ */
331
+ #if !defined(__CYGWIN__ )&& !defined(WIN32 )
335
332
if (stat_buf .st_mode & (S_IRWXG |S_IRWXO ))
336
333
elog (FATAL ,"data directory %s has group or world access; permissions should be u=rwx (0700)" ,
337
334
checkdir );
338
- #endif /* !__CYGWIN__ */
335
+ #endif
339
336
340
337
/* Look for PG_VERSION before looking for pg_control */
341
338
ValidatePgVersion (checkdir );