aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/map.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-05-09 13:59:56 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-05-09 14:06:40 +0100
commit4c2c4f0fdc54f9bdb5371a108c3dc7886e6c81ec (patch)
tree731e32b41934b03c0d7fc802f57e76eb58ea2cb1 /src/libutil/map.c
parent7b0d41173904268944de296ab85f20efef91bde5 (diff)
downloadrspamd-4c2c4f0fdc54f9bdb5371a108c3dc7886e6c81ec.tar.gz
rspamd-4c2c4f0fdc54f9bdb5371a108c3dc7886e6c81ec.zip
[Fix] Allow to follow symlinks when safe
Issue: #1625
Diffstat (limited to 'src/libutil/map.c')
-rw-r--r--src/libutil/map.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libutil/map.c b/src/libutil/map.c
index c6a7189a8..1855ca5d5 100644
--- a/src/libutil/map.c
+++ b/src/libutil/map.c
@@ -180,7 +180,7 @@ rspamd_map_check_file_sig (const char *fname,
if (bk->trusted_pubkey == NULL) {
/* Try to load and check pubkey */
rspamd_snprintf (fpath, sizeof (fpath), "%s.pub", fname);
- data = rspamd_file_xmap (fpath, PROT_READ, &len);
+ data = rspamd_file_xmap (fpath, PROT_READ, &len, TRUE);
if (data == NULL) {
msg_err_map ("can't open pubkey %s: %s", fpath, strerror (errno));
@@ -628,7 +628,7 @@ read_map_file (struct rspamd_map *map, struct file_map_data *data,
return TRUE;
}
- bytes = rspamd_file_xmap (data->filename, PROT_READ, &len);
+ bytes = rspamd_file_xmap (data->filename, PROT_READ, &len, TRUE);
if (bytes == NULL) {
msg_err_map ("can't open map %s: %s", data->filename, strerror (errno));