Re: Kerberos authentication, Active Directory, and PostgreSQL

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: "Turner, Ian" <Ian(dot)Turner(at)deshaw(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org, "Silverman, Richard" <res(at)deshaw(dot)com>
Subject: Re: Kerberos authentication, Active Directory, and PostgreSQL
Date: 2009-10-13 14:01:48
Message-ID: 1255442508.6540.32.camel@fsopti579.F-Secure.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, 2009-10-12 at 20:42 -0400, Turner, Ian wrote:
> --- postgresql-8.4-8.4.1/src/backend/libpq/auth.c 2009-06-25 12:30:08.000000000 +0100
> +++ postgresql-8.4-8.4.1-fixed/src/backend/libpq/auth.c 2009-09-15 20:27:01.000000000 +0100
> @@ -166,6 +166,8 @@
> #endif
>
> static int pg_GSS_recvauth(Port *port);
> +
> +#define GSS_MAX_TOKEN_LENGTH (32767)
> #endif /* ENABLE_GSS */
>
>

A small wish in case we go with this: The constant should be named
something like PG_...; otherwise it looks like we are defining or
overriding an official symbol from the GSS API.

> @@ -937,7 +939,7 @@
>
> /* Get the actual GSS token */
> initStringInfo(&buf);
> - if (pq_getmessage(&buf, 2000))
> + if (pq_getmessage(&buf, GSS_MAX_TOKEN_LENGTH))
> {
> /* EOF - pq_getmessage already logged error */
> pfree(buf.data);

To wit, the above hunk looks quite misleading in isolation.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2009-10-13 14:05:02 Re: Kerberos authentication, Active Directory, and PostgreSQL
Previous Message Magnus Hagander 2009-10-13 13:36:54 Re: Kerberos authentication, Active Directory, and PostgreSQL