aboutsummaryrefslogtreecommitdiffstats
path: root/agent/gpg-agent.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2024-02-27 09:35:46 +0000
committerWerner Koch <[email protected]>2024-02-27 09:36:22 +0000
commit962058f704867082d6d00f6467a79c78e41169ca (patch)
tree4cdb21422cdd037add8db508644ac39483cc8264 /agent/gpg-agent.c
parentagent: Allow GET_PASSPHRASE in restricted mode. (diff)
downloadgnupg-962058f704867082d6d00f6467a79c78e41169ca.tar.gz
gnupg-962058f704867082d6d00f6467a79c78e41169ca.zip
Allow tilde expansion for the foo-program options.
* agent/gpg-agent.c (parse_rereadable_options): Use make_filename_try for opt.pinentry_program. Change definition accordingly. * g10/gpg.c (main): Use make_filename for agent_program, dirmngr_program, and keyboxd_program. Change definition accordingly. * sm/gpgsm.c (main): Ditto. * tools/gpg-card.c (parse_arguments): Ditto. * tools/gpg-connect-agent.c (main): Ditto. * tools/gpg-wks-client.c (parse_arguments): Likewise. Do it also for option --output. (process_confirmation_request): Print a note for a successful sent. -- GnuPG-bug-id: 7017
Diffstat (limited to 'agent/gpg-agent.c')
-rw-r--r--agent/gpg-agent.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c
index a5448ac38..5305098d2 100644
--- a/agent/gpg-agent.c
+++ b/agent/gpg-agent.c
@@ -864,6 +864,7 @@ parse_rereadable_options (gpgrt_argparse_t *pargs, int reread)
opt.debug = 0;
opt.no_grab = 1;
opt.debug_pinentry = 0;
+ xfree (opt.pinentry_program);
opt.pinentry_program = NULL;
opt.pinentry_touch_file = NULL;
xfree (opt.pinentry_invisible_char);
@@ -924,7 +925,10 @@ parse_rereadable_options (gpgrt_argparse_t *pargs, int reread)
case oNoGrab: opt.no_grab |= 1; break;
case oGrab: opt.no_grab |= 2; break;
- case oPinentryProgram: opt.pinentry_program = pargs->r.ret_str; break;
+ case oPinentryProgram:
+ xfree (opt.pinentry_program);
+ opt.pinentry_program = make_filename_try (pargs->r.ret_str, NULL);
+ break;
case oPinentryTouchFile: opt.pinentry_touch_file = pargs->r.ret_str; break;
case oPinentryInvisibleChar:
xfree (opt.pinentry_invisible_char);