Re: Support for NSS as a libpq TLS backend

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>, Andres Freund <andres(at)anarazel(dot)de>
Cc: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Michael Paquier <michael(at)paquier(dot)xyz>, Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Subject: Re: Support for NSS as a libpq TLS backend
Date: 2020-10-27 20:18:29
Message-ID: 7ed636a0-872c-3ea7-dc44-b35dd515bb87@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 27/10/2020 22:07, Daniel Gustafsson wrote:
> /*
> * Track whether the NSS database has a password set or not. There is no API
> * function for retrieving password status, so we simply flip this to true in
> * case NSS invoked the password callback - as that will only happen in case
> * there is a password. The reason for tracking this is that there are calls
> * which require a password parameter, but doesn't use the callbacks provided,
> * so we must call the callback on behalf of these.
> */
> static bool has_password = false;

This is set in PQssl_passwd_cb function, but never reset. That seems
wrong. The NSS database used in one connection might have a password,
while another one might not. Or have I completely misunderstood this?

- Heikki

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message John Naylor 2020-10-27 20:19:47 Re: cutting down the TODO list thread
Previous Message Daniel Gustafsson 2020-10-27 20:07:01 Re: Support for NSS as a libpq TLS backend