Re: BUG #6302: Certificate lookup fails for users with /dev/null as home directory
От | Magnus Hagander |
---|---|
Тема | Re: BUG #6302: Certificate lookup fails for users with /dev/null as home directory |
Дата | |
Msg-id | CABUevEzbAzNC2s592MqmCT6XZMKGFqMxBnXc_MkY-+Rfmdar3g@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: BUG #6302: Certificate lookup fails for users with /dev/null as home directory (Diego Elio Pettenò <flameeyes@flameeyes.eu>) |
Список | pgsql-bugs |
On Mon, Nov 21, 2011 at 19:03, Diego Elio Petten=F2 <flameeyes@flameeyes.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. --=20 =A0Magnus Hagander =A0Me: http://www.hagander.net/ =A0Work: http://www.redpill-linpro.com/
В списке pgsql-bugs по дате отправления: