From bcca735a1ad72a5449b2f1430e6eac36ed59b9ef Mon Sep 17 00:00:00 2001 From: SJ Date: Wed, 15 May 2013 12:05:42 +0200 Subject: [PATCH] fixed permission problem for extracting attachments --- src/config.h | 2 +- src/extract.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config.h b/src/config.h index 6340dd0c..13c7c128 100644 --- a/src/config.h +++ b/src/config.h @@ -14,7 +14,7 @@ #define VERSION "0.1.24-dbfix-branch" -#define BUILD 815 +#define BUILD 816 #define HOSTID "mailarchiver" diff --git a/src/extract.c b/src/extract.c index 0b630c73..459046c5 100644 --- a/src/extract.c +++ b/src/extract.c @@ -111,7 +111,7 @@ int unzip_file(struct session_data *sdata, struct _state *state, char *filename, snprintf(extracted_filename, sizeof(extracted_filename)-1, "%s-%d-%d%s", sdata->ttmpfile, *rec, i, p); - fd = open(extracted_filename, O_CREAT|O_RDWR, S_IRUSR|S_IWUSR); + fd = open(extracted_filename, O_CREAT|O_RDWR, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH); if(fd != -1){ zf = zip_fopen_index(z, i, 0); if(zf){