summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-xbin/askpass16
1 files changed, 13 insertions, 3 deletions
diff --git a/bin/askpass b/bin/askpass
index 27dbb0d..7ba6f61 100755
--- a/bin/askpass
+++ b/bin/askpass
@@ -1,4 +1,14 @@
-#!/bin/bash
+#!/bin/sh
+# echo "${ASKPASS_PROMPT:-Enter your password}" | \
+#     MENU_PROMPT='password:' MENU_PASSWORD=1 menu
 
-echo "${ASKPASS_PROMPT:-Enter your password}" | \
-    MENU_PROMPT='password:' menu
+desc=${ASKPASS_DESC:-Authenticating as \"$(id -un)\" <uid $(id -u)>}
+prompt=${ASKPASS_PROMPT:-Password}
+
+cat <<-EOF | ${PINENTRY:-pinentry} | awk '/D./{ print $2; }'
+SETTIMEOUT 30
+SETDESC ${desc}
+SETPROMPT ${prompt}
+SETTITLE askpass
+GETPIN
+EOF