krb5 & multiple users

Поиск
Список
Период
Сортировка
От Ed Schaller
Тема krb5 & multiple users
Дата
Msg-id 20020520131317.GC12126@darkmist.net
обсуждение исходный текст
Ответы Re: krb5 & multiple users
Список pgsql-interfaces
I am trying to connect to the database multiple times with different
user accounts using kerberos. Unfortunately the current libpq libraries
keep all of the kerberos credentials and such in static variables that
are used for all subsequent connections. After changing to a different
user, all authentications fail since it is trying to use the previous
credentials.

Looking at the source code, I figured I could just move the the static
vars to the PGconn structure. As I did it turned out that the conn
structure was not available where it was needed, so I thought I would
post here for suggestions.

The options I am looking at are:

Add it to the PGconn structure and pull it in where it is needed. This
would require some api changes.

Keep a hash of the usernames in static space and use the right
credentials for the right user. This would fix the problem, but it would
require extra data structures that aren't integrated into the rest of
the library.

The third option is to just not save credentials at all, but load them
each time for each connection or new connection. This would probably be
the simplest, but will require a little more file io and such.

Does anyone have any suggestions on this? It would probably be good to
integrate this fix into the next version.

thanks

>>>------>

--

+-------------+-----------------------+---------------+
| Ed Schaller | schallee@darkmist.net | mistymushroom |
+-------------+-----------------------+---------------+



----- End forwarded message -----

>>>------>

--

+-------------+-----------------------+---------------+
| Ed Schaller | schallee@darkmist.net | mistymushroom |
+-------------+-----------------------+---------------+

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

Предыдущее
От: "Ted Petrosky"
Дата:
Сообщение: libpq or ++ or xx with Project Builder help needed
Следующее
От: Tom Lane
Дата:
Сообщение: Re: krb5 & multiple users