subprocess pipe

Camille Harang mammique at garbure.org
Sun Nov 14 21:16:22 CET 2010


Tim Harig a écrit :
> On 2010-11-14, Camille Harang <mammique at garbure.org> wrote:
>> # pg_dump prompts for password so I inject it in stdin.
>> pgsql.stdin.write('MY_PASSWORD' + '\n')
> 
> For security reasons, some programs use direct access to the TTY system
> for password entry rather then reading from stdin.  Most of these programs
> provide another access mechanism that can be used for authentication
> (ie public keys or storing the password in a permission restricted
> configuration file.

Ha, indeed, I suspected that pg_dump didn't behave normally, security
matters might be an explanation, I'll dig in that way, thanks a lot.

Regards,

Camille.




More information about the Python-list mailing list