summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill A. Korinsky <kirill@korins.ky>2024-03-03 12:56:11 +0100
committerKirill A. Korinsky <kirill@korins.ky>2024-03-03 12:56:11 +0100
commit5c0ddad2c1574d8028130d9daa3363cc3ca50983 (patch)
treec74336e07c41e6d733faf2953857836a77f3a154
parent4d15d6f17b98c97f5235d928f6e4ffb5f18307e6 (diff)
pinetnry: treat empty password as close window
-rwxr-xr-xutil/pinentry/stumpwm-pinentry3
1 files changed, 3 insertions, 0 deletions
diff --git a/util/pinentry/stumpwm-pinentry b/util/pinentry/stumpwm-pinentry
index d7b4ff3..1f2c4b3 100755
--- a/util/pinentry/stumpwm-pinentry
+++ b/util/pinentry/stumpwm-pinentry
@@ -13,6 +13,9 @@ while IFS="\n" read -r command; do
prompt=${command:10}
elif [ "$command" == GETPIN ]; then
password=$(printf "%s\n%s\n" "$description" "$prompt" | nc 127.0.0.1 22222)
+ if [ -z "$password" ]; then
+ echo S close_button
+ fi
echo D "$password"
elif [ "$command" == BYE ]; then
exit 0