diff options
author | NIIBE Yutaka <[email protected]> | 2023-07-11 01:46:36 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2023-07-11 01:46:36 +0000 |
commit | 250733c0d86d392c6e37b62cc82df0c396362581 (patch) | |
tree | 500ef09b98a8cc8d6a1903a0deeddd99e4d04f64 /common/sysutils.h | |
parent | common,gpg,kbx: Factor out open_stream_nc. (diff) | |
download | gnupg-250733c0d86d392c6e37b62cc82df0c396362581.tar.gz gnupg-250733c0d86d392c6e37b62cc82df0c396362581.zip |
common: Add gnupg_check_special_filename.
* common/sysutils.h (gnupg_check_special_filename): New.
* common/sysutils.c (gnupg_check_special_filename): New.
* common/iobuf.c (translate_file_handle): Remove.
(iobuf_is_pipe_filename): Use gnupg_check_special_filename.
(do_open): Use gnupg_check_special_filename.
* g10/plaintext.c (get_output_file): Use gnupg_check_special_filename
and open_stream_nc.
--
GnuPG-bug-id: 6580
Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'common/sysutils.h')
-rw-r--r-- | common/sysutils.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/common/sysutils.h b/common/sysutils.h index 8cc303b61..c6740a874 100644 --- a/common/sysutils.h +++ b/common/sysutils.h @@ -76,6 +76,7 @@ int translate_sys2libc_fd (gnupg_fd_t fd, int for_write); int translate_sys2libc_fd_int (int fd, int for_write); gpg_error_t gnupg_parse_fdstr (const char *fdstr, es_syshd_t *r_syshd); int check_special_filename (const char *fname, int for_write, int notranslate); +gnupg_fd_t gnupg_check_special_filename (const char *fname); FILE *gnupg_tmpfile (void); void gnupg_reopen_std (const char *pgmname); void gnupg_inhibit_set_foregound_window (int yes); |