Re: "could not accept SSPI security context" - Mailing list pgsql-general

From Ahmed Shinwari
Subject Re: "could not accept SSPI security context"
Date
Msg-id AANLkTi=FiYCo=XsF6pD3wxMZBKGX-veaYS_XJ849VYGN@mail.gmail.com
Whole thread Raw
In response to Re: "could not accept SSPI security context"  (Brar Piening <brar@gmx.de>)
Responses Re: "could not accept SSPI security context"  (Ahmed Shinwari <ahmed.shinwari@gmail.com>)
List pgsql-general


On Sat, Feb 19, 2011 at 11:31 PM, Brar Piening <brar@gmx.de> wrote:
On Thu, 17 Feb 2011 07:58:46 -0800 (PST), Ahmed <ahmed.shinwari@gmail.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.
I agree.


For now, Francisco may check in that part which fixes the bug due to encoding. And, address the later issue after further investigation.

 

Regards,

Brar

pgsql-general by date:

Previous
From: tv@fuzzy.cz
Date:
Subject: Re: database is bigger after dump/restore - why? (60 GB to 109 GB)
Next
From: Sim Zacks
Date:
Subject: Re: ldap authentication multiple ou objects