[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: feature request to support stdin in GNU install
From: |
Rob Landley |
Subject: |
Re: feature request to support stdin in GNU install |
Date: |
Wed, 26 Jul 2023 18:08:17 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 |
On 7/26/23 17:32, Pádraig Brady wrote:
> On 26/07/2023 15:55, Dröge, Lars wrote:
>> Dear coreutils developers,
>>
>> I have read many tutorials, where a secret is written to a file, which
>> is protected afterwards, like this:
>>
>> ```
>> generate_secret > keyfile
>> chmod 0600 keyfile
>> ```
>>
>> I hope that the following approach would have been intuitive and more
>> secure, as the keyfile was never readable:
>>
>> ```
>> generate_secret | install -x -m 0600 keyfile
>> ```
>>
>> where "-x" would indicate, that stdin shall be used as source. Please
>> take "x" as a placeholder; any letter works for me.
The traditional filename that's a synonym for stdin is "-".
>> Do you like the idea to support stdin?
>>
>> Best regards,
>> Lars
>
> Well /dev/stdin works for this. I.e. this works:
>
> echo secret | install -m 0600 /dev/stdin keyfile
Presumably also install -m 0600 <(generate_secret) keyfile
Rob