Re: Refactor SASL exchange in preparation for OAuth Bearer - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: Refactor SASL exchange in preparation for OAuth Bearer
Date
Msg-id 86FCD541-91BD-48E6-9327-FEB162EADB31@yesql.se
Whole thread Raw
In response to Re: Refactor SASL exchange in preparation for OAuth Bearer  (Jacob Champion <jacob.champion@enterprisedb.com>)
Responses Re: Refactor SASL exchange in preparation for OAuth Bearer
List pgsql-hackers
> On 26 Feb 2024, at 19:56, Jacob Champion <jacob.champion@enterprisedb.com> wrote:

>> + * SASL_FAILED: The exchance has failed and the connection should be
>
> s/exchance/exchange/

I rank that as one of my better typos actually. Fixed though.

>> - if (final && !done)
>> + if (final && !(status == SASL_FAILED || status == SASL_COMPLETE))
>
> Since there's not yet a SASL_ASYNC, I wonder if this would be more
> readable if it were changed to
>    if (final && status == SASL_CONTINUE)
> to match the if condition shortly after it.

Fair point, that's more readable in this commit.

> In 0002, at the beginning of pg_SASL_init, the `password` variable now
> has an uninitialized code path. The OAuth patchset initializes it to
> NULL:

Nice catch, fixed.

--
Daniel Gustafsson


Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Relation bulk write facility
Next
From: Tomas Vondra
Date:
Subject: Re: BitmapHeapScan streaming read user and prelim refactoring