Re: Trusted authentication with TDS 7.3 fails

LacaK <[email protected]> Tue, 7 Feb 2017 08:52:57 +0100
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
Dňa 6.2.2017 o 15:30 Frediano Ziglio napísal(a):
>>>> I am trying connect to MS SQL Server 2016 Express using FreeTDS db-lib.
>>>>
>>>> I have compiled db-lib myself from 1.00.11 sources with #define HAVE_SSPI
>>>> 1
>>>> (I do NOT define  HAVE_OPENSSL)
>>>>
>>>> I can successfuly connect using standard authentication (supplied user
>>>> name
>>>> and password).
>>>>
>>>> I can successfuly connect also using empty user name and password
>>>> (Trusted
>>>> authentication), but only if I set TDS version to 7.1 (freetds71.log).
>>>>
>>>> When I change TDS version to 7.3 I can not connect (with error message
>>>> "Adaptive server connection failed") (freetds73a.log).
>>>>
>>>> When I use precompiled DLL from appveyor (which requires OpenSSL:
>>>> ssleay32.dll and libeay32.dll) I also can NOT connect with TDS 7.3
>>>> (freetds73b.log).
>>>>
>>>> See please attached logs.
>>>>
>>>> Any idea why NTLM authentication with TDS 7.3 does not work ?
>>>> (I have tried also adding "use ntlmv2 = yes" to FreeTDS.conf, but does
>>>> not
>>>> seems to help)
>>>>
>>>> Thanks
>>>>
>>>> -Laco.
>>>>
>>> In tds_sspi_handle_next there are these lines:
>>>
>>>           if (len < 32)
>>>                   return TDS_FAIL;
>>>
>>> can you try to replace 32 with 16 ?
>> Yes when I change 32 to 16 all works as expected ... :-)
>> Thank you very much. May be, that you will commit it also to master branch ?
>> -Laco.
>>
>
> Sure. Question is mainly if I should remove the check or which number
> to put. Maybe 1 ?
Unfortunately I cannot advise, because my knowledge about SSPI is equal 
zero ;-)
But I guess, that SSPI is generic API which can support various 
providers, so packet data structure/length depends on provider 
(authentification mechanism) used.
I have no idea what can be minimal length, but 1 is for sure minimum ;-)
Thank you for the commit ...
-Laco.
_______________________________________________
FreeTDS mailing list
[email protected]
http://lists.ibiblio.org/mailman/listinfo/freetds