diff options
author | Bruce Momjian <bruce@momjian.us> | 2003-04-18 01:03:42 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2003-04-18 01:03:42 +0000 |
commit | 4d4953fc4187567f73e7e5ccd6678d19a156c240 (patch) | |
tree | 37b702cafe9076bd1e6fccc058fb908b5b0e32f1 /src/backend/postmaster/postmaster.c | |
parent | cb7fb3ca958ec8bd5a14e740c067f1d096af3454 (diff) | |
download | postgresql-4d4953fc4187567f73e7e5ccd6678d19a156c240.tar.gz postgresql-4d4953fc4187567f73e7e5ccd6678d19a156c240.zip |
Make Win32 tests to match existing Cygwin tests, where appropriate.
Diffstat (limited to 'src/backend/postmaster/postmaster.c')
-rw-r--r-- | src/backend/postmaster/postmaster.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index e9df82a1476..499c4f25ca2 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.311 2003/04/17 22:26:01 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.312 2003/04/18 01:03:42 momjian Exp $ * * NOTES * @@ -299,9 +299,7 @@ checkDataDir(const char *checkdir) char path[MAXPGPATH]; FILE *fp; -#ifndef __CYGWIN__ struct stat stat_buf; -#endif if (checkdir == NULL) { @@ -314,15 +312,6 @@ checkDataDir(const char *checkdir) ExitPostmaster(2); } - /* - * 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) @@ -332,10 +321,18 @@ checkDataDir(const char *checkdir) 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. + */ +#if !defined(__CYGWIN__) && !defined(WIN32) if (stat_buf.st_mode & (S_IRWXG | S_IRWXO)) elog(FATAL, "data directory %s has group or world access; permissions should be u=rwx (0700)", checkdir); -#endif /* !__CYGWIN__ */ +#endif /* Look for PG_VERSION before looking for pg_control */ ValidatePgVersion(checkdir); |