Re: Username and password from DSN being overwritten (fix - Mailing list pgsql-odbc

From Hiroshi Inoue
Subject Re: Username and password from DSN being overwritten (fix
Date
Msg-id 45350139.4080408@tpf.co.jp
Whole thread Raw
In response to Username and password from DSN being overwritten (fix included)  ("Rick Hair" <rhair@bowmansystems.com>)
List pgsql-odbc
Rick Hair wrote:
> 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.
>
> !     if (cbUID > 0)
>
> !           make_string(szUID, cbUID, ci->username, sizeof(ci->username));
>
> !     if (cbAuthStr > 0)
>
> !           make_string(szAuthStr, cbAuthStr, ci->password,
> sizeof(ci->password));
>

The above patch seems to be wrong because cbUID(cvAuthStr) can be SQL_NTS.
OK I would take care of this case.
Please try the snapshot dll at
  http://www.geocities.jp/inocchichichi/psqlodbc/index.html
.

regards,
Hiroshi Inoue


pgsql-odbc by date:

Previous
From: "Rick Hair"
Date:
Subject: Username and password from DSN being overwritten (fix included)
Next
From: Mark Morgan Lloyd
Date:
Subject: Installation on NT4 revisited