Re: [7.3devl] Using PGPASSWORDFILE with psql requires -U

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: [7.3devl] Using PGPASSWORDFILE with psql requires -U
Дата
Msg-id Pine.LNX.4.44.0208292349210.21563-100000@cm-lcon1-46-187.cm.vtr.net
обсуждение исходный текст
Ответ на [7.3devl] Using PGPASSWORDFILE with psql requires -U option?  (Gordon Runkle <gar@integrated-dynamics.com>)
Ответы Re: [7.3devl] Using PGPASSWORDFILE with psql requires -U
Re: [7.3devl] Using PGPASSWORDFILE with psql requires -U
Список pgsql-hackers
Gordon Runkle dijo: 

> I'm using the current CVS (as of ~1930 EDT, 29AUG02) on RedHat's latest
> beta (null).  I find that I need to use the -U option when trying to use
> psql and the new PGPASSWORDFILE variable.

Ok, in private email with Gordon I discovered that I missed by one.
Please apply the following.  Thanks for the report.

Index: src/interfaces/libpq/fe-connect.c
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/interfaces/libpq/fe-connect.c,v
retrieving revision 1.199
diff -c -r1.199 fe-connect.c
*** src/interfaces/libpq/fe-connect.c    2002/08/29 23:06:32    1.199
--- src/interfaces/libpq/fe-connect.c    2002/08/30 03:52:40
***************
*** 2953,2960 ****                 (t = pwdfMatchesString(t, dbname)) == NULL ||                 (t =
pwdfMatchesString(t,username)) == NULL)             continue;
 
!         ret=(char *)malloc(sizeof(char)*strlen(t));
!         strncpy(ret, t, strlen(t));         fclose(fp);         return ret;     }
--- 2953,2960 ----                 (t = pwdfMatchesString(t, dbname)) == NULL ||                 (t =
pwdfMatchesString(t,username)) == NULL)             continue;
 
!         ret=(char *)malloc(sizeof(char)*(strlen(t)+1));
!         strncpy(ret, t, strlen(t)+1);         fclose(fp);         return ret;     }

-- 
Alvaro Herrera (<alvherre[a]atentus.com>)
"La felicidad no es mañana. La felicidad es ahora"



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Reporting query duration
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [7.3devl] Using PGPASSWORDFILE with psql requires -U