[git] Pinentry - branch, master, updated. pinentry-0.9.7-27-g4c5ae72
by Werner Koch
cvs at cvs.gnupg.org
Thu Sep 1 10:07:45 CEST 2016
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The standard pinentry collection".
The branch, master has been updated
via 4c5ae72d481ffd24ff93accee0b42e9b264285f2 (commit)
from c032ea2dcb4ac3ce970e62eae88fd24bec822f9c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 4c5ae72d481ffd24ff93accee0b42e9b264285f2
Author: Werner Koch <wk at gnupg.org>
Date: Thu Sep 1 10:03:22 2016 +0200
curses: Return better error codes for bad ttynames
* pinentry/pinentry-curses.c (dialog_create): Return better error
codes.
--
With this change the error message is now
$ MYTTY=$(tty)
$ echo getpin | env -i pinentry-curses -d --ttyname "$MYTTY"
OK Pleased to meet you
pinentry-curses: no LC_CTYPE known - assuming UTF-8
ERR 83886383 Required environment variable not set <Pinentry>
Note that with the current released libgcrypt an unknown error code
will be printed.
GnuPG-bug-id: 2452
Signed-off-by: Werner Koch <wk at gnupg.org>
diff --git a/pinentry/pinentry-curses.c b/pinentry/pinentry-curses.c
index 659fa47..9882cbf 100644
--- a/pinentry/pinentry-curses.c
+++ b/pinentry/pinentry-curses.c
@@ -50,6 +50,12 @@
#include "pinentry.h"
+#if GPG_ERROR_VERSION_NUMBER < 0x011900 /* 1.25 */
+# define GPG_ERR_WINDOW_TOO_SMALL 301
+# define GPG_ERR_MISSING_ENVVAR 303
+#endif
+
+
/* FIXME: We should allow configuration of these button labels and in
any case use the default_ok, default_cancel values if available.
However, I have no clue about curses and localization. */
@@ -370,7 +376,8 @@ dialog_create (pinentry_t pinentry, dialog_t dialog)
if (y > size_y)
{
err = 1;
- pinentry->specific_err = gpg_error (GPG_ERR_ASS_LINE_TOO_LONG);
+ pinentry->specific_err = gpg_error (size_y < 0? GPG_ERR_MISSING_ENVVAR
+ /* */ : GPG_ERR_WINDOW_TOO_SMALL);
goto out;
}
@@ -425,7 +432,8 @@ dialog_create (pinentry_t pinentry, dialog_t dialog)
if (x > size_x)
{
err = 1;
- pinentry->specific_err = gpg_error (GPG_ERR_ASS_LINE_TOO_LONG);
+ pinentry->specific_err = gpg_error (size_x < 0? GPG_ERR_MISSING_ENVVAR
+ /* */ : GPG_ERR_WINDOW_TOO_SMALL);
goto out;
}
-----------------------------------------------------------------------
Summary of changes:
pinentry/pinentry-curses.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
hooks/post-receive
--
The standard pinentry collection
http://git.gnupg.org
More information about the Gnupg-commits
mailing list