mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
Added SELInux hacks and did some cleanups.
This commit is contained in:
parent
d44906ad4d
commit
151ca81f1a
22 changed files with 396 additions and 62 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue