Re: Proposed patch to datacopy to allow passwords to be read from stdin

Frediano Ziglio <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <CAHt6W4cvGEc7BWibfoKTE929ji3iyrat66usBLEJ4dTm+n+y=w@mail.gmail.com>
2012/8/23 Stuart Henderson <[email protected]>:
> On 2012-08-18, James K. Lowden <[email protected]> wrote:
>> I had a script such as
>>
>>       #! /bin/sh
>>       awk "\$2 == \"$1\" {print \$6}" ~/.netrc
>>
>> called "getpass".  Now the command:
>>
>>   datacopy -S$S/$U/$(getpass $S)/$D/$T ...
>>
>> does the job.
>
> This still shows in the command line, though.
>

I agree passing a password on command line is a security risk.

If I remember many of our tools ask for password if argument is
omitted. We use a readpassphrase function to read the password in a
portable and threadsafe way. In this case we cannot omit the password
and perhaps empty password is more common than a single dash.

Frediano
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.