From 871f6d25f741d25591c994587e54ad254100e87e Mon Sep 17 00:00:00 2001 From: drduh Date: Fri, 3 Jul 2015 14:54:08 -0400 Subject: [PATCH] Use fd 3 for retrieving password in encrypt function instead of command line arg. --- pwd.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pwd.sh b/pwd.sh index c680505..7ec5f71 100755 --- a/pwd.sh +++ b/pwd.sh @@ -57,11 +57,11 @@ decrypt () { encrypt () { # Encrypt with a password. - # TODO(drduh): don't retrieve passphrase as arg + ${gpg} \ --symmetric --armor --batch --yes \ - --command-fd 0 --passphrase "${1}" \ - --output "${2}" "${3}" 2>/dev/null + --passphrase-fd 3 \ + --output "${2}" "${3}" 3< <(echo "${1}") }