Re: BUG #6302: Certificate lookup fails for users with /dev/null as home directory

Поиск
Список
Период
Сортировка
От Diego Elio Pettenò
Тема Re: BUG #6302: Certificate lookup fails for users with /dev/null as home directory
Дата
Msg-id 1321898611.5998.3.camel@titan.home.flameeyes.eu
обсуждение исходный текст
Ответ на Re: BUG #6302: Certificate lookup fails for users with /dev/null as home directory  (Magnus Hagander <magnus@hagander.net>)
Ответы Re: BUG #6302: Certificate lookup fails for users with /dev/null as home directory  (Magnus Hagander <magnus@hagander.net>)
Список pgsql-bugs
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...

> Without validating the server certificate, however, it's kind of hard
> to actually call it secure.

As you said, that's a different beast altogether and is not what it's
doing right now ;)

> 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.

This way it doesn't really matter if the error is ENOENT, ENOTDIR,
ETOOLONG, or whatever else, if the file is unusable just tell me so and
don't use it.. authentication may proceed just fine.

> That's a different thing though. We'd have to do both though - but let
> $HOME override it.

That would be the preferred option indeed.

Thanks,

--
Diego Elio Pettenò <flameeyes@flameeyes.eu>



В списке pgsql-bugs по дате отправления:

Предыдущее
От: Diego Elio Pettenò
Дата:
Сообщение: Re: BUG #6302: Certificate lookup fails for users with /dev/null as home directory
Следующее
От: Robert Haas
Дата:
Сообщение: Re: BUG #6300: duplicate key value violates unique constraint