diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-05-09 13:59:56 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-05-09 14:06:40 +0100 |
commit | 4c2c4f0fdc54f9bdb5371a108c3dc7886e6c81ec (patch) | |
tree | 731e32b41934b03c0d7fc802f57e76eb58ea2cb1 /src/fuzzy_storage.c | |
parent | 7b0d41173904268944de296ab85f20efef91bde5 (diff) | |
download | rspamd-4c2c4f0fdc54f9bdb5371a108c3dc7886e6c81ec.tar.gz rspamd-4c2c4f0fdc54f9bdb5371a108c3dc7886e6c81ec.zip |
[Fix] Allow to follow symlinks when safe
Issue: #1625
Diffstat (limited to 'src/fuzzy_storage.c')
-rw-r--r-- | src/fuzzy_storage.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/fuzzy_storage.c b/src/fuzzy_storage.c index 90f283b4a..50bc864bc 100644 --- a/src/fuzzy_storage.c +++ b/src/fuzzy_storage.c @@ -2762,7 +2762,8 @@ start_fuzzy (struct rspamd_worker *worker) if (ctx->collection_id_file) { gint fd; - fd = rspamd_file_xopen (ctx->collection_id_file, O_RDONLY, 0); + fd = rspamd_file_xopen (ctx->collection_id_file, O_RDONLY, 0, + FALSE); if (fd == -1) { if (errno != ENOENT) { @@ -2862,7 +2863,7 @@ start_fuzzy (struct rspamd_worker *worker) /* Try to save collection id */ fd = rspamd_file_xopen (ctx->collection_id_file, - O_WRONLY | O_CREAT | O_TRUNC, 00644); + O_WRONLY | O_CREAT | O_TRUNC, 00644, 0); if (fd == -1) { msg_err ("cannot open collection id to store in %s: %s", |