Skip to Content.
Sympa Menu

freetds - bug in login.c (latest version)

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Bill Thompson" <thompbil AT exchange.uk.ml.com>
  • To: freetds AT franklin.oit.unc.edu
  • Subject: bug in login.c (latest version)
  • Date: Wed, 7 Aug 2002 12:22:58 -0400


there's a bug in the latest version of login.c , in tds7_send_login()

we seem to have left in reference to the variable domain_login instead of
using the #if DOMAIN precompiler directive. As the value of domain_login
has been reversed, this has an adverse effect.

Itwasnteasytoseeastherewerenoblanklinestobreakupthecodeintoreadablechunks;-)


I have replaced the lines:

tds7_ascii2unicode(tds,config->host_name, unicode_string, 255);
tds_put_n(tds,unicode_string,host_name_len * 2);
if (!domain_login) {
tds7_ascii2unicode(tds,config->user_name, unicode_string, 255);
tds_put_n(tds,unicode_string,user_name_len * 2);
tds7_ascii2unicode(tds,config->password, unicode_string, 255);
tds7_crypt_pass(unicode_string, password_len * 2, unicode_string);
tds_put_n(tds,unicode_string,password_len * 2);
}
tds7_ascii2unicode(tds,config->app_name, unicode_string, 255);

with:

tds7_ascii2unicode(tds,config->host_name, unicode_string, 255);
tds_put_n(tds,unicode_string,host_name_len * 2);

#if DOMAIN
/* Do Nothing */
#else
tds7_ascii2unicode(tds,config->user_name, unicode_string, 255);
tds_put_n(tds,unicode_string,user_name_len * 2);
tds7_ascii2unicode(tds,config->password, unicode_string, 255);
tds7_crypt_pass(unicode_string, password_len * 2, unicode_string);
tds_put_n(tds,unicode_string,password_len * 2);
#endif

tds7_ascii2unicode(tds,config->app_name, unicode_string, 255);

And it did the business for me.

Bill



  • bug in login.c (latest version), Bill Thompson, 08/07/2002

Archive powered by MHonArc 2.6.24.

Top of Page