From 53da7169e1a97320ad68f7b2305a60085523b14a Mon Sep 17 00:00:00 2001 From: Michal Koutný Date: Mon, 29 Jan 2024 11:12:10 +0100 Subject: When gpg-agent is run as a systemd user service (not in the session). Also, PIN of the keyring should not be visible to other users on the system. --- pinentry-rofi.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pinentry-rofi.sh b/pinentry-rofi.sh index d64a1f6..e09c60e 100755 --- a/pinentry-rofi.sh +++ b/pinentry-rofi.sh @@ -100,6 +100,7 @@ keyinfo="" main () { local temp_str + umask 0077 assuan_send "OK Please go ahead" @@ -231,7 +232,8 @@ main () { if [ "$0" = "$BASH_SOURCE" ]; then - if [ "$XDG_SESSION_TYPE" != "tty" ] ; then + sess_type="${XDG_SESSION_TYPE:-}" + if [ "$sess_type" != "tty" ] ; then main else pinentry-tty "$@" -- cgit