Re: FW: [ppa-dev] Severe bug in debian - phppgadmin opens

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: FW: [ppa-dev] Severe bug in debian - phppgadmin opens
Дата
Msg-id 200111281850.fASIoTC25971@candle.pha.pa.us
обсуждение исходный текст
Список pgsql-hackers
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> >> Is there a safe way to send username and password to psql?
> 
> > The standard way I know of is to use 'expect' and wrap your psql call
> > around that.
> 
> Didn't you break that by making psql read the password from /dev/tty?
> Or can 'expect' take control of /dev/tty?

Expect communicates with the process via pseudo-ttys, so it works fine. 
Also, if it can't read /dev/tty, it will read from stdin.  At least that
is that standard way to do it.

getpass() docs said:
    The getpass() function displays a prompt to, and reads in a password    from, /dev/tty. If this file is not
accessible,getpass displays the    prompt on the standard error output and reads from the standard input.
 

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Sequence docs
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: FW: [ppa-dev] Severe bug in debian - phppgadmin opens