pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robbie Harwood <rharwood@redhat.com>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Subject: Re: [PATCH v10] GSSAPI encryption support
Date: Fri, 01 Apr 2016 15:00:07 -0400
Message-ID: <jlgmvpd40js.fsf@thriss.redhat.com> (raw)
In-Reply-To: <CAB7nPqTtJrFYy6Z5fyRiKg8DNdQ5bpCH_Qmbarhx0rSoK2RvQA@mail.gmail.com>
References: <jlg1tgq1ktm.fsf@thriss.redhat.com>
	<jlgpoua3syy.fsf@thriss.redhat.com>
	<CAB7nPqTtJrFYy6Z5fyRiKg8DNdQ5bpCH_Qmbarhx0rSoK2RvQA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Michael Paquier <michael.paquier@gmail.com> writes:

> On Fri, Apr 1, 2016 at 12:31 PM, Robbie Harwood <rharwood@redhat.com> wrote:
>
>> - Fixed buffering of large replies on the serverside.  This should fix
>>   the traceback that was being seen.  The issue had to do with the
>>   difference between the server and client calling conventions for the
>>   _read and _write functions.
>
> This does not fix the issue. I am still able to crash the server with
> the same trace.

Interesting.  I guess I'll keep trying to reproduce this.

>> - Move gss_encrypt out of the GUCs and into connection-specific logic.
>>   Thanks to Tom Lane for pointing me in the right direction here.
>
> +   /* delay processing until after AUTH_REQ_OK has been sent */
> +   if (port->gss->gss_encrypt != NULL)
> +       port->gss->encrypt = !strcmp(port->gss->gss_encrypt, "on");
>
> You should use parse_bool here, because contrary to libpq, clients
> should be able to use other values like "1", "0", "off", 'N', 'Y',
> etc.

Missed that function somehow.  Will fix.

>> - Replace writev() with two calls to _raw_write().  I'm not attached to
>>   this design; if someone has a preference for allocating a buffer and
>>   making a single write from that, I could be persuaded.  I don't know
>>   what the performance tradeoffs are.
>
> Relying on pqsecure_raw_write and pqsecure_raw_read is a better bet
> IMO, there is already some low-level error handling.

Indeed, it looks like it should especially lead to better behavior on
Windows.

>  static ConfigVariable *ProcessConfigFileInternal(GucContext context,
>                           bool applySettings, int elevel);
>
> -
>  /*
>
> Spurious noise.

Indeed, will fix.

Attachments:

  signature.asc (application/pgp-signature, 818B) download

view thread (220+ messages)  latest in thread

Message-ID: <jlgmvpd40js.fsf@thriss.redhat.com>
Permalink:  ../jlgmvpd40js.fsf@thriss.redhat.com/
Also on:    postgresql.org/message-id/jlgmvpd40js.fsf@thriss.redhat.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: rharwood@redhat.com, michael.paquier@gmail.com
  Subject: Re: [PATCH v10] GSSAPI encryption support
  In-Reply-To: <jlgmvpd40js.fsf@thriss.redhat.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox