diff options
author | Werner Koch <[email protected]> | 2004-10-13 18:10:06 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2004-10-13 18:10:06 +0000 |
commit | 151ca81f1a5a03ae83d9c14ab7748a2d3c09919e (patch) | |
tree | 38cc8933051a1e45cd3e95cd8cc66746290f7e31 /g10/decrypt.c | |
parent | Add dearmor.c (diff) | |
download | gnupg-151ca81f1a5a03ae83d9c14ab7748a2d3c09919e.tar.gz gnupg-151ca81f1a5a03ae83d9c14ab7748a2d3c09919e.zip |
Added SELInux hacks and did some cleanups.
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)); |