summaryrefslogtreecommitdiffstats
path: root/g10/keygen.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2004-10-13 20:10:06 +0200
committerWerner Koch <wk@gnupg.org>2004-10-13 20:10:06 +0200
commit151ca81f1a5a03ae83d9c14ab7748a2d3c09919e (patch)
tree38cc8933051a1e45cd3e95cd8cc66746290f7e31 /g10/keygen.c
parentAdd dearmor.c (diff)
downloadgnupg2-151ca81f1a5a03ae83d9c14ab7748a2d3c09919e.tar.xz
gnupg2-151ca81f1a5a03ae83d9c14ab7748a2d3c09919e.zip
Added SELInux hacks and did some cleanups.
Diffstat (limited to 'g10/keygen.c')
-rw-r--r--g10/keygen.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/g10/keygen.c b/g10/keygen.c
index fe3893499..6380ca171 100644
--- a/g10/keygen.c
+++ b/g10/keygen.c
@@ -2215,6 +2215,12 @@ read_parameter_file( const char *fname )
fname = "-";
fp = iobuf_open (fname);
+ if (fp && is_secured_file (iobuf_get_fd (fp)))
+ {
+ iobuf_close (fp);
+ fp = NULL;
+ errno = EPERM;
+ }
if (!fp) {
log_error (_("can't open `%s': %s\n"), fname, strerror(errno) );
return;