fixed permission problem for extracting attachments

This commit is contained in:
SJ 2013-05-15 12:05:42 +02:00
parent a1385cf948
commit bcca735a1a
2 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@
#define VERSION "0.1.24-dbfix-branch" #define VERSION "0.1.24-dbfix-branch"
#define BUILD 815 #define BUILD 816
#define HOSTID "mailarchiver" #define HOSTID "mailarchiver"

View File

@ -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); 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){ if(fd != -1){
zf = zip_fopen_index(z, i, 0); zf = zip_fopen_index(z, i, 0);
if(zf){ if(zf){