Improve wrapper to fallback to curses even with DISPLAY set (#622077)

- improved wrapper provided by Ben Boeckel
This commit is contained in:
Stanislav Ochotnicky 2011-07-26 10:02:16 +02:00
parent 7bf242f871
commit 7db36dd56d
2 changed files with 8 additions and 4 deletions

View File

@ -59,7 +59,10 @@ then
elif [ -x /usr/bin/pinentry-qt ]
then
export PINENTRY_BINARY="/usr/bin/pinentry-qt"
# pinentry-curses is installed by default
# pinentry-curses is installed by default, test if we're in a terminal
elif [ -t 2 ]
then
export PINENTRY_BINARY="/usr/bin/pinentry-curses"
else
#test if gui binary is required
for opt in "$@"; do
@ -69,8 +72,6 @@ else
exit 1
fi
done
export PINENTRY_BINARY="/usr/bin/pinentry-curses"
fi
fi

View File

@ -17,7 +17,7 @@
Name: pinentry
Version: 0.8.1
Release: 3%{?dist}
Release: 4%{?dist}
Summary: Collection of simple PIN or passphrase entry dialogs
Group: Applications/System
@ -189,6 +189,9 @@ fi
%changelog
* Tue Jul 26 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.8.1-4
- Improve wrapper to fallback to curses even with DISPLAY set (#622077)
* Fri Feb 18 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.8.1-3
- Fix pinentry-curses running as root by disabling capabilities (#677670)