Skip site navigation (1) Skip section navigation (2)

Re: [COMMITTERS] pgsql: Use symbolic names not octal constants for file permission flags

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Use symbolic names not octal constants for file permission flags
Date: 2010-12-11 18:00:26
Message-ID: 5619.1292090426@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-hackers
Magnus Hagander <magnus(at)hagander(dot)net> writes:
> On Sat, Dec 11, 2010 at 18:46, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> I think we can just #define the other cases as zeroes. I'm not sure why
>> you think that's an issue for open --- the privileges don't exist.

> Hmm. I was/am worried about any case that specifies *just* one of the
> permissions that don't exist. That'll leave it at zero, whereas the
> correct one might be the user-only version of whatever (read/write)
> was given.

If we didn't specify the "user" read or write privilege, we shouldn't
get it.

What are the values of _S_IREAD and _S_IWRITE, anyway?  I'm still
wondering how come the previous coding with hardwired constants
behaved correctly.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Robert HaasDate: 2010-12-11 18:15:45
Subject: Re: create tablespace fails silently, or succeeds improperly
Previous:From: Magnus HaganderDate: 2010-12-11 17:55:43
Subject: Re: [COMMITTERS] pgsql: Use symbolic names not octal constants for file permission flags

pgsql-committers by date

Next:From: Tom LaneDate: 2010-12-11 18:11:29
Subject: pgsql: Provide a complete set of file-permission-bit macros inwin32.h.
Previous:From: Magnus HaganderDate: 2010-12-11 17:55:43
Subject: Re: [COMMITTERS] pgsql: Use symbolic names not octal constants for file permission flags

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group