Re: Win32 defines - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: Win32 defines
Date
Msg-id 200304170313.h3H3Dw326454@candle.pha.pa.us
Whole thread Raw
In response to Re: Win32 defines  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > [ patch removes #ifndef CYGWIN around permissions checks ]
>
> Has Windows' filesystem gotten better since we put those #ifdefs in
> there?  IIRC, they're there because PG refused to boot on Windows
> without 'em.

Is this the check you are asking about:

+ #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

The check is still there, but it does the stat() and checks the return
code first, then skips the group/other checks.


--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073


pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Win32 defines
Next
From: Bruce Momjian
Date:
Subject: Re: Win32 defines