diff options
author | Michal Koutný <mkoutny@suse.com> | 2024-01-29 11:12:10 +0100 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2024-01-29 11:30:34 +0100 |
commit | 53da7169e1a97320ad68f7b2305a60085523b14a (patch) | |
tree | 8dbcfdf8a4df836443e4dd12f859ec7af5a2a7d3 /pinentry-rofi.sh | |
parent | 18ef97dcae8dd2b8af2dc905e11d2dbd3e452a06 (diff) | |
download | pinentry-rofi-53da7169e1a97320ad68f7b2305a60085523b14a.tar.gz |
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.
Diffstat (limited to 'pinentry-rofi.sh')
-rwxr-xr-x | pinentry-rofi.sh | 4 |
1 files changed, 3 insertions, 1 deletions
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 "$@" |