aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2001-12-04 16:17:48 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2001-12-04 16:17:48 +0000
commit0e9e888ebdc0fa99e8bea45ac3849e30f9ae5599 (patch)
treef4e6d2cd1cbe40d5b1f7a89cbca38aeb4a6e2583
parent388008cdd76eadcf633027270384828aaab466ad (diff)
downloadpostgresql-0e9e888ebdc0fa99e8bea45ac3849e30f9ae5599.tar.gz
postgresql-0e9e888ebdc0fa99e8bea45ac3849e30f9ae5599.zip
Suppress data directory access-permissions check when __CYGWIN__,
per recent pghackers discussions. Improving this should be a TODO for 7.3.
-rw-r--r--src/backend/postmaster/postmaster.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index a5553815fb7..4f97e7ef9a6 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -37,7 +37,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.261 2001/11/12 05:43:24 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.262 2001/12/04 16:17:48 tgl Exp $
*
* NOTES
*
@@ -280,7 +280,9 @@ checkDataDir(const char *checkdir)
{
char path[MAXPGPATH];
FILE *fp;
+#ifndef __CYGWIN__
struct stat stat_buf;
+#endif
if (checkdir == NULL)
{
@@ -295,7 +297,13 @@ checkDataDir(const char *checkdir)
/*
* Check if the directory has group or world access. If so, reject.
+ *
+ * XXX temporarily suppress check when on Windows, because there may
+ * not be proper support for Unix-y file permissions. Need to think
+ * of a reasonable check to apply on Windows.
*/
+#ifndef __CYGWIN__
+
if (stat(checkdir, &stat_buf) == -1)
{
if (errno == ENOENT)
@@ -309,6 +317,8 @@ checkDataDir(const char *checkdir)
elog(FATAL, "data directory %s has group or world access; permissions should be u=rwx (0700)",
checkdir);
+#endif /* !__CYGWIN__ */
+
/* Look for PG_VERSION before looking for pg_control */
ValidatePgVersion(checkdir);