Username and password from DSN being overwritten (fix included)

Поиск
Список
Период
Сортировка
От Rick Hair
Тема Username and password from DSN being overwritten (fix included)
Дата
Msg-id 005301c6f176$4e4111c0$1103000a@RickHair
обсуждение исходный текст
Ответы Re: Username and password from DSN being overwritten (fix  (Hiroshi Inoue <inoue@tpf.co.jp>)
Список pgsql-odbc

Hi all,

 

I ran into a problem recently trying to use the latest CVS version of the ODBC driver with Business Objects XI Release 2. The username and password specified for a connection in the ODBC setup panel were being ignored by the driver. I discovered that after some recent changes to the make_string() function in misc.c, the DSN defaults were always being overwritten by whatever username and password were passed to PGAPI_Connect(), even if they were empty strings.

 

Below is a (very small) patch to connection.c to work around the issue.

 

Thanks,

Rick Hair

 

 

 

*** psqlodbc.old/connection.c 2006-10-13 08:13:31.000000000 -0500

--- psqlodbc.new/connection.c 2006-10-16 17:09:31.000000000 -0500

***************

*** 127,134 ****

       * override values from DSN info with UID and authStr(pwd) This only

       * occurs if the values are actually there.

       */

!     make_string(szUID, cbUID, ci->username, sizeof(ci->username));

!     make_string(szAuthStr, cbAuthStr, ci->password, sizeof(ci->password));

 

      /* fill in any defaults */

      getDSNdefaults(ci);

--- 127,136 ----

       * override values from DSN info with UID and authStr(pwd) This only

       * occurs if the values are actually there.

       */

!     if (cbUID > 0)

!           make_string(szUID, cbUID, ci->username, sizeof(ci->username));

!     if (cbAuthStr > 0)

!           make_string(szAuthStr, cbAuthStr, ci->password, sizeof(ci->password));

 

      /* fill in any defaults */

      getDSNdefaults(ci);

В списке pgsql-odbc по дате отправления:

Предыдущее
От: Sean Davis
Дата:
Сообщение: Re: [NOVICE] -- New to read from Oracle and insert into Postgress
Следующее
От: Hiroshi Inoue
Дата:
Сообщение: Re: Username and password from DSN being overwritten (fix