diff --git passage-1.7.4a2/src/password-store.sh passage-1.7.4a2.mod/src/password-store.sh index 02d3fb0..ab1d9f5 100755 --- passage-1.7.4a2/src/password-store.sh +++ passage-1.7.4a2.mod/src/password-store.sh @@ -127,7 +127,9 @@ clip() { local paste_cmd=( xclip -o -selection "$X_SELECTION" ) local display_name="$DISPLAY" else - die "Error: No X11 or Wayland display and clipper detected" + local copy_cmd=( termux-clipboard-set ) + local paste_cmd=( termux-clipboard-get ) + local display_name="termux" fi local sleep_argv0="password store sleep on display $display_name" @@ -184,15 +186,19 @@ tmpdir() { } trap remove_tmpfile EXIT else - [[ $warn -eq 1 ]] && yesno "$(cat <<-_EOF - Your system does not have /dev/shm, which means that it may - be difficult to entirely erase the temporary non-encrypted - password file after editing. - - Are you sure you would like to continue? - _EOF - )" - SECURE_TMPDIR="$(mktemp -d "${TMPDIR:-/tmp}/$template")" + if [[ "$(uname -o)" != "Android" && -z "$TERMUX_VERSION" ]]; then + if [[ $warn -eq 1 ]]; then + yesno "$(cat <<-_EOF + Your system does not have /dev/shm, which means that it may + be difficult to entirely erase the temporary non-encrypted + password file after editing. + + Are you sure you would like to continue? + _EOF + )" + fi + fi + SECURE_TMPDIR="$(mktemp -d "${TMPDIR:-@TERMUX_PREFIX@/tmp}/$template")" shred_tmpfile() { find "$SECURE_TMPDIR" -type f -exec $SHRED {} + rm -rf "$SECURE_TMPDIR"