diff options
author | Werner Koch <wk@gnupg.org> | 2024-02-27 10:35:46 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2024-02-27 10:36:22 +0100 |
commit | 962058f704867082d6d00f6467a79c78e41169ca (patch) | |
tree | 4cdb21422cdd037add8db508644ac39483cc8264 /sm/gpgsm.c | |
parent | agent: Allow GET_PASSPHRASE in restricted mode. (diff) | |
download | gnupg2-962058f704867082d6d00f6467a79c78e41169ca.tar.xz gnupg2-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 'sm/gpgsm.c')
-rw-r--r-- | sm/gpgsm.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/sm/gpgsm.c b/sm/gpgsm.c index b3d48abce..3948372e4 100644 --- a/sm/gpgsm.c +++ b/sm/gpgsm.c @@ -1335,8 +1335,19 @@ main ( int argc, char **argv) case oHomedir: gnupg_set_homedir (pargs.r.ret_str); break; case oChUid: break; /* Command line only (see above). */ - case oAgentProgram: opt.agent_program = pargs.r.ret_str; break; - case oKeyboxdProgram: opt.keyboxd_program = pargs.r.ret_str; break; + + case oAgentProgram: + xfree (opt.agent_program); + opt.agent_program = make_filename (pargs.r.ret_str, NULL); + break; + case oKeyboxdProgram: + xfree (opt.keyboxd_program); + opt.keyboxd_program = make_filename (pargs.r.ret_str, NULL); + break; + case oDirmngrProgram: + xfree (opt.dirmngr_program); + opt.dirmngr_program = make_filename (pargs.r.ret_str, NULL); + break; case oDisplay: set_opt_session_env ("DISPLAY", pargs.r.ret_str); @@ -1354,7 +1365,6 @@ main ( int argc, char **argv) case oLCctype: opt.lc_ctype = xstrdup (pargs.r.ret_str); break; case oLCmessages: opt.lc_messages = xstrdup (pargs.r.ret_str); break; - case oDirmngrProgram: opt.dirmngr_program = pargs.r.ret_str; break; case oDisableDirmngr: opt.disable_dirmngr = 1; break; case oPreferSystemDirmngr: /* Obsolete */; break; case oProtectToolProgram: |