aboutsummaryrefslogtreecommitdiffstats
path: root/g10/import.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2004-10-13 18:10:06 +0000
committerWerner Koch <[email protected]>2004-10-13 18:10:06 +0000
commit151ca81f1a5a03ae83d9c14ab7748a2d3c09919e (patch)
tree38cc8933051a1e45cd3e95cd8cc66746290f7e31 /g10/import.c
parentAdd dearmor.c (diff)
downloadgnupg-151ca81f1a5a03ae83d9c14ab7748a2d3c09919e.tar.gz
gnupg-151ca81f1a5a03ae83d9c14ab7748a2d3c09919e.zip
Added SELInux hacks and did some cleanups.
Diffstat (limited to '')
-rw-r--r--g10/import.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/g10/import.c b/g10/import.c
index 28ecb819a..9586ba314 100644
--- a/g10/import.c
+++ b/g10/import.c
@@ -165,6 +165,12 @@ import_keys_internal( IOBUF inp, char **fnames, int nnames,
IOBUF inp2 = iobuf_open(fname);
if( !fname )
fname = "[stdin]";
+ if (inp2 && is_secured_file (iobuf_get_fd (inp2)))
+ {
+ iobuf_close (inp2);
+ inp2 = NULL;
+ errno = EPERM;
+ }
if( !inp2 )
log_error(_("can't open `%s': %s\n"), fname, strerror(errno) );
else {