Re: [BUG] SSPI authentication fails on Windows when server parameter is localhost or domain name - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: [BUG] SSPI authentication fails on Windows when server parameter is localhost or domain name
Date
Msg-id CABUevEzgL8E65opBothantJx7ouo3XSqTid384c2-FiwFQf2VA@mail.gmail.com
Whole thread Raw
In response to [BUG] SSPI authentication fails on Windows when server parameter is localhost or domain name  (Ahmed Shinwari <ahmed.shinwari@gmail.com>)
Responses Re: [BUG] SSPI authentication fails on Windows when server parameter is localhost or domain name
List pgsql-hackers
On Wed, Jun 15, 2011 at 10:53, Ahmed Shinwari <ahmed.shinwari@gmail.com> wrote:
> Hi All,
>
> I faced a bug on Windows while connecting via SSPI authentication. I was
> able to find the bug and have attached the patch. Details listed below;
>
> Postgres Installer: Version 9.0.4
> OS: Windows Server 2008 R2/Windows 7

<big snip>

Thanks - great analysis!

However, I think there is a better fix for this - simply moving a }
one line. In particular, I'm concerned about passing the same pointer
both as input and output to the function - I couldn't find anything in
the documentation saying this was safe (nor did I find anything saying
it's unsafe, but.) Especially since this code clearly behaves
different on different versions - I've been completely unable to
reproduce this on any of my test machines, but they are all Windows
Server 2003.

So - attached is a new version of the patch, how does this look to
you? FYI, I've had Thom test this new version and it does appear to
work fine in his scenario.


--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

Attachment

pgsql-hackers by date:

Previous
From: Alexey Klyukin
Date:
Subject: Re: proposal: a validator for configuration files
Next
From: Teodor Sigaev
Date:
Subject: Re: Understanding GIN posting trees