3737 *
3838 *
3939 * 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 $
4141 *
4242 * NOTES
4343 *
@@ -299,9 +299,7 @@ checkDataDir(const char *checkdir)
299299char path [MAXPGPATH ];
300300FILE * fp ;
301301
302- #ifndef __CYGWIN__
303302struct stat stat_buf ;
304- #endif
305303
306304if (checkdir == NULL )
307305{
@@ -314,15 +312,6 @@ checkDataDir(const char *checkdir)
314312ExitPostmaster (2 );
315313}
316314
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-
326315if (stat (checkdir ,& stat_buf )== -1 )
327316{
328317if (errno == ENOENT )
@@ -332,10 +321,18 @@ checkDataDir(const char *checkdir)
332321checkdir );
333322}
334323
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 )
335332if (stat_buf .st_mode & (S_IRWXG |S_IRWXO ))
336333elog (FATAL ,"data directory %s has group or world access; permissions should be u=rwx (0700)" ,
337334checkdir );
338- #endif /* !__CYGWIN__ */
335+ #endif
339336
340337/* Look for PG_VERSION before looking for pg_control */
341338ValidatePgVersion (checkdir );