diff options
author | Werner Koch <[email protected]> | 2016-11-29 15:18:24 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2016-11-29 15:54:36 +0000 |
commit | 60b4982836a00ef6b2a97d16f735b3f6b74dce62 (patch) | |
tree | 95b51ae8ed413646ebdc601d8344fd85e34965dd /g10/gpg.c | |
parent | g10: Fix memory leak. (diff) | |
download | gnupg-60b4982836a00ef6b2a97d16f735b3f6b74dce62.tar.gz gnupg-60b4982836a00ef6b2a97d16f735b3f6b74dce62.zip |
gpg,sm: Merge the two versions of check_special_filename.
* sm/gpgsm.c (check_special_filename): Move to ..
* common/sysutils.c (check_special_filename): here. Add arg
NOTRANSLATE.
(allow_special_filenames): New local var.
(enable_special_filenames): New public functions.
* sm/gpgsm.c (allow_special_filenames): Remove var.
(main): Call enable_special_filenames instead of setting the var.
(open_read, open_es_fread, open_es_fwrite): Call
check_special_filename with 0 for NOTRANSLATE.
* common/iobuf.c (special_names_enabled): Remove var.
(iobuf_enable_special_filenames): Remove func.
(check_special_filename): Remove func.
(iobuf_is_pipe_filename): Call new version of the function with
NOTRANSLATE set.
(do_open): Ditto.
* g10/gpg.c (main): Call enable_special_filenames instead of
iobuf_enable_special_filenames.
* g10/gpgv.c (main): Ditto.
--
Note that we keep the iobuf.c:translate_file_handle because it is a
bit different (for whatever reasons) than the translate function from
sysutils.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to '')
-rw-r--r-- | g10/gpg.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -3304,9 +3304,11 @@ main (int argc, char **argv) case oAllowSecretKeyImport: /* obsolete */ break; case oTryAllSecrets: opt.try_all_secrets = 1; break; case oTrustedKey: register_trusted_key( pargs.r.ret_str ); break; + case oEnableSpecialFilenames: - iobuf_enable_special_filenames (1); + enable_special_filenames (); break; + case oNoExpensiveTrustChecks: opt.no_expensive_trust_checks=1; break; case oAutoCheckTrustDB: opt.no_auto_check_trustdb=0; break; case oNoAutoCheckTrustDB: opt.no_auto_check_trustdb=1; break; |