aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Koutný <mkoutny@suse.com>2024-05-07 11:46:48 +0200
committerMatěj Cepl <mcepl@cepl.eu>2024-07-21 22:51:10 +0200
commit65e623a629c3a75e5b62ba48b67744e5f1beef54 (patch)
tree38b7360f777952ac58dfdfe3acf5177192a30b47
parent53da7169e1a97320ad68f7b2305a60085523b14a (diff)
downloadpinentry-rofi-master.tar.gz
Make debugging output opt-inHEADmaster
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-xpinentry-rofi.sh2
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() {