diff options
Diffstat (limited to '')
-rw-r--r-- | g10/decrypt.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/g10/decrypt.c b/g10/decrypt.c index 028815eec..90130872c 100644 --- a/g10/decrypt.c +++ b/g10/decrypt.c @@ -58,6 +58,12 @@ decrypt_message( const char *filename ) /* open the message file */ fp = iobuf_open(filename); + if (fp && is_secured_file (iobuf_get_fd (fp))) + { + iobuf_close (fp); + fp = NULL; + errno = EPERM; + } if( !fp ) { log_error(_("can't open `%s'\n"), print_fname_stdin(filename)); return G10ERR_OPEN_FILE; @@ -140,6 +146,12 @@ decrypt_messages(int nfiles, char *files[]) if (!output) goto next_file; fp = iobuf_open(filename); + if (fp && is_secured_file (iobuf_get_fd (fp))) + { + iobuf_close (fp); + fp = NULL; + errno = EPERM; + } if (!fp) { log_error(_("can't open `%s'\n"), print_fname_stdin(filename)); |