From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, The Hermit Hacker <scrappy(at)hub(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | Re: [HACKERS] TODO list updated |
Date: | 2000-01-13 13:15:57 |
Message-ID: | 200001131315.IAA25149@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> On Wed, 12 Jan 2000, Tom Lane wrote:
>
> > Note that if initdb is a shell script, then it still has to be very
> > careful what it does with the password; put it in any command line
> > for a program invoked by the script, and the leak is back with you.
> > A C-program version of initdb would be a lot safer. But in theory you
> > can pass the password to the backend without exposing it in any command
> > line (put it in a data file instead, say).
>
> What is does is some sort of sed s/genericpassword/realpassword/ so I
> guess this is not completely safe either. But something like this you'd
> have to do. Can I count you in on beating Bruce into submission for an
> initdb in C? ;)
I will be responsible to make sure the password doesn't get into a
command as an argument. sed has a -f command that will take it's regex
input from a file. That is the solution, though the umask has to be set
to make sure the temp file is not readable by anyone else.
Most OS vendors use shell scripts for this type of thing because it
doesn't have to be fast, and it is changed often.
--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Allan Huffman | 2000-01-13 13:16:42 | [HACK]-[INTERFACE] jdbc/postgresql.jar execution errors |
Previous Message | Peter Eisentraut | 2000-01-13 12:55:08 | Re: [HACKERS] TODO list updated |