diff options
author | Michal Koutný <mkoutny@suse.com> | 2024-05-07 11:46:48 +0200 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2024-07-21 22:51:10 +0200 |
commit | 65e623a629c3a75e5b62ba48b67744e5f1beef54 (patch) | |
tree | 38b7360f777952ac58dfdfe3acf5177192a30b47 | |
parent | 53da7169e1a97320ad68f7b2305a60085523b14a (diff) | |
download | pinentry-rofi-master.tar.gz |
Despite the file is user-only readable, generate the output only when
debugging the tool (DEBUG=1 in environment) to prevent forgotten PIN
inside log files to be leaked.
Also slight attempt to support multi-user systems (not tested).
-rwxr-xr-x | pinentry-rofi.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pinentry-rofi.sh b/pinentry-rofi.sh index e09c60e..f7b3ba2 100755 --- a/pinentry-rofi.sh +++ b/pinentry-rofi.sh @@ -38,7 +38,7 @@ set -eu VERSION="0.0.1" log_debug() { - echo "$@" >> /tmp/pinentry-log.txt + [ -z "${DEBUG:-}" ] || echo "$@" >> /tmp/pinentry-log-$USER.txt } assuan_send() { |