Re: "could not accept SSPI security context"

From: Brar Piening <brar(at)gmx(dot)de>
To: Ahmed <ahmed(dot)shinwari(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: "could not accept SSPI security context"
Date: 2011-02-19 18:31:48
Message-ID: 4D600C94.2030802@gmx.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 17 Feb 2011 07:58:46 -0800 (PST), Ahmed
<ahmed(dot)shinwari(at)gmail(dot)com> wrote:
> I tried changing that one line to use UTF-8 encoder, but the password packet
> didn't get fixed. It works smoothly if kept in byte array instead of string.
Yes, as SSPI uses binary bytes we have to avoid to convert them to
characters and back to bytes during message generation.

While "char *buffer" in C can serve as both a string and a buffer of
binary bytes, we have "byte[]" as binary buffer and "string" as string
in c#.
This is the reason why we need to use byte[] in all places where libpq
uses char* without really caring whether there is a string inside or
some opaque bytes.

> I think changing the AuthenticationSSPI case to use context.Host may break
> the cases Brar's mentioned.
If this isn't necessary to fix the problem we should probably get some
more instight to what really happens here before fixing one end and
breaking the other.

Regards,

Brar

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message deepak 2011-02-19 21:30:42 Re: Building extensions on Windows using VS2008
Previous Message Devrim GÜNDÜZ 2011-02-19 14:50:08 Re: mysql 2 pg script...