aboutsummaryrefslogtreecommitdiffstats
path: root/g10/photoid.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/photoid.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/photoid.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/g10/photoid.c b/g10/photoid.c
index 9487c0fb9..385a6818e 100644
--- a/g10/photoid.c
+++ b/g10/photoid.c
@@ -83,9 +83,15 @@ PKT_user_id *generate_photo_id(PKT_public_key *pk)
goto scram;
file=iobuf_open(filename);
+ if (file && is_secured_file (iobuf_get_fd (file)))
+ {
+ iobuf_close (file);
+ file = NULL;
+ errno = EPERM;
+ }
if(!file)
{
- log_error(_("Unable to open JPEG file `%s': %s\n"),
+ log_error(_("unable to open JPEG file `%s': %s\n"),
filename,strerror(errno));
continue;
}