diff options
author | Werner Koch <[email protected]> | 2024-02-27 09:35:46 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2024-02-27 09:36:22 +0000 |
commit | 962058f704867082d6d00f6467a79c78e41169ca (patch) | |
tree | 4cdb21422cdd037add8db508644ac39483cc8264 /tools/gpg-connect-agent.c | |
parent | agent: Allow GET_PASSPHRASE in restricted mode. (diff) | |
download | gnupg-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 'tools/gpg-connect-agent.c')
-rw-r--r-- | tools/gpg-connect-agent.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/tools/gpg-connect-agent.c b/tools/gpg-connect-agent.c index eb897287c..cf4e64e2b 100644 --- a/tools/gpg-connect-agent.c +++ b/tools/gpg-connect-agent.c @@ -126,9 +126,9 @@ struct int quiet; /* Be extra quiet. */ int autostart; /* Start the server if not running. */ const char *homedir; /* Configuration directory name */ - const char *agent_program; /* Value of --agent-program. */ - const char *dirmngr_program; /* Value of --dirmngr-program. */ - const char *keyboxd_program; /* Value of --keyboxd-program. */ + char *agent_program; /* Value of --agent-program. */ + char *dirmngr_program; /* Value of --dirmngr-program. */ + char *keyboxd_program; /* Value of --keyboxd-program. */ int hex; /* Print data lines in hex format. */ int decode; /* Decode received data lines. */ int use_dirmngr; /* Use the dirmngr and not gpg-agent. */ @@ -1224,9 +1224,15 @@ main (int argc, char **argv) case oVerbose: opt.verbose++; break; case oNoVerbose: opt.verbose = 0; break; case oHomedir: gnupg_set_homedir (pargs.r.ret_str); break; - case oAgentProgram: opt.agent_program = pargs.r.ret_str; break; - case oDirmngrProgram: opt.dirmngr_program = pargs.r.ret_str; break; - case oKeyboxdProgram: opt.keyboxd_program = pargs.r.ret_str; break; + case oAgentProgram: + opt.agent_program = make_filename (pargs.r.ret_str, NULL); + break; + case oDirmngrProgram: + opt.dirmngr_program = make_filename (pargs.r.ret_str, NULL); + break; + case oKeyboxdProgram: + opt.keyboxd_program = make_filename (pargs.r.ret_str, NULL); + break; case oNoAutostart: opt.autostart = 0; break; case oNoHistory: opt.no_history = 1; break; case oHex: opt.hex = 1; break; |