diff options
author | Werner Koch <[email protected]> | 2023-03-15 11:05:45 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2023-03-15 11:05:45 +0000 |
commit | da044776311e2951e1deea696939346123bde029 (patch) | |
tree | 2ba3ae0f18ca9c17844afc2dc8cbc24e9252ab50 | |
parent | gpgtar: Print a result status with skipped files. (diff) | |
download | gnupg-da044776311e2951e1deea696939346123bde029.tar.gz gnupg-da044776311e2951e1deea696939346123bde029.zip |
gpgtar: Do not allow the use of stdout for --status-fd
* tools/gpgtar.c (main): Don't allow logging via the Registry. Forbid
using stdout for status-fd in crypt mode.
--
Without that check a status output would be mixed up with the input to
the internal call of gpg.
Using the Registry key to enable logging is very annoying.
-rw-r--r-- | tools/gpgtar.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/gpgtar.c b/tools/gpgtar.c index e6c28ebe5..207f553bc 100644 --- a/tools/gpgtar.c +++ b/tools/gpgtar.c @@ -453,7 +453,7 @@ main (int argc, char **argv) gnupg_reopen_std (GPGTAR_NAME); set_strusage (my_strusage); - log_set_prefix (GPGTAR_NAME, GPGRT_LOG_WITH_PREFIX); + log_set_prefix (GPGTAR_NAME, GPGRT_LOG_WITH_PREFIX|GPGRT_LOG_NO_REGISTRY); /* Make sure that our subsystems are ready. */ i18n_init(); @@ -495,7 +495,11 @@ main (int argc, char **argv) log_fatal ("status-fd is invalid: %s\n", strerror (errno)); if (fd == 1) - opt.status_stream = es_stdout; + { + opt.status_stream = es_stdout; + if (!skip_crypto) + log_fatal ("using stdout for the status-fd is not possible\n"); + } else if (fd == 2) opt.status_stream = es_stderr; else |