From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | Diego Elio Pettenò <flameeyes(at)flameeyes(dot)eu> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #6302: Certificate lookup fails for users with /dev/null as home directory |
Date: | 2011-12-03 14:09:16 |
Message-ID: | CABUevEzbAzNC2s592MqmCT6XZMKGFqMxBnXc_MkY-+Rfmdar3g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Mon, Nov 21, 2011 at 19:03, Diego Elio Pettenò
<flameeyes(at)flameeyes(dot)eu> wrote:
> Il giorno lun, 21/11/2011 alle 18.59 +0100, Magnus Hagander ha scritto:
>> So a simple extension of the check to be for both ENOENT and ENOTDIR
>> would work, right?
>
> In this case, yes...
Ok, I've applied this quick-fix for head, 9.1 and 9.0 (which is as far
back as that code goes).
Unfortunately I forgot about the push earlier this week, so it's going
to miss the releases that go out early next week. But it will be in
the next ones.
>> So yes, you'd fail. But in a scenario where you had say the wrong
>> permissions on the file, we'd silently ignore it - this doesn't seem
>> like the right thing to do. And it will cause scenarios hard to debug.
>
> I would say that the proper solution would be something like:
>
> Check if the file is reachable with stat; if any error happens during
> stat(), log it (eventually) but let it pass; if the file is present but
> with wrong (too wide?) permissions, throw an error, otherwise just use
> it.
We don't really have a way to log warnings in the libpq client. In
theory we could just spit it to stderr, but that seems like a really
bad idea.
--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/
From | Date | Subject | |
---|---|---|---|
Next Message | MirrorX | 2011-12-04 12:27:51 | could not truncate directory "pg_subtrans": apparent wraparound |
Previous Message | Albe Laurenz | 2011-12-03 10:55:31 | Re: BUG #6318: pg_dump for non-template languages is broken |