diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2019-07-11 07:55:28 +0200 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2019-07-11 07:55:28 +0200 |
commit | 02d8b383833bac0382e910a2058b11b127acfd4d (patch) | |
tree | babdf7732caa6f86f27cd9cb16d00afa1a231070 /agent | |
parent | scd: Fix internal CCID driver, so that -DTEST works. (diff) | |
download | gnupg2-02d8b383833bac0382e910a2058b11b127acfd4d.tar.xz gnupg2-02d8b383833bac0382e910a2058b11b127acfd4d.zip |
agent: Relax the handling of pinentry error for keyboard grab.
* agent/call-pinentry.c (start_pinentry): It's not fatal when
pinentry doesn't support no-grab/grab option.
GnuPG-bug-id: 4587
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'agent')
-rw-r--r-- | agent/call-pinentry.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/agent/call-pinentry.c b/agent/call-pinentry.c index 9271b4ae9..a895a8b8f 100644 --- a/agent/call-pinentry.c +++ b/agent/call-pinentry.c @@ -423,7 +423,17 @@ start_pinentry (ctrl_t ctrl) opt.no_grab? "OPTION no-grab":"OPTION grab", NULL, NULL, NULL, NULL, NULL, NULL); if (rc) - return unlock_pinentry (ctrl, rc); + { + if (gpg_err_code (rc) == GPG_ERR_NOT_SUPPORTED + || gpg_err_code (rc) == GPG_ERR_UNKNOWN_OPTION) + { + if (opt.verbose) + log_info ("Option no-grab/grab is ignored by pinentry.\n"); + /* Keep going even if the feature is not supported. */ + } + else + return unlock_pinentry (ctrl, rc); + } value = session_env_getenv (ctrl->session_env, "GPG_TTY"); if (value) |