aboutsummaryrefslogtreecommitdiffstats
path: root/g10/photoid.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/photoid.c')
-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;
}