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/libutil/util.h | |
parent | 7b0d41173904268944de296ab85f20efef91bde5 (diff) | |
download | rspamd-4c2c4f0fdc54f9bdb5371a108c3dc7886e6c81ec.tar.gz rspamd-4c2c4f0fdc54f9bdb5371a108c3dc7886e6c81ec.zip |
[Fix] Allow to follow symlinks when safe
Issue: #1625
Diffstat (limited to 'src/libutil/util.h')
-rw-r--r-- | src/libutil/util.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libutil/util.h b/src/libutil/util.h index 605822fee..7f6ccc2f6 100644 --- a/src/libutil/util.h +++ b/src/libutil/util.h @@ -479,7 +479,8 @@ struct event_base * event_get_base (struct event *ev); * @param mode mode to open * @return fd or -1 in case of error */ -int rspamd_file_xopen (const char *fname, int oflags, guint mode); +int rspamd_file_xopen (const char *fname, int oflags, guint mode, + gboolean allow_symlink); /** * Map file without following symlinks or special stuff @@ -488,8 +489,8 @@ int rspamd_file_xopen (const char *fname, int oflags, guint mode); * @param size target size (must NOT be NULL) * @return pointer to memory (should be freed using munmap) or NULL in case of error */ -gpointer rspamd_file_xmap (const char *fname, guint mode, - gsize *size); +gpointer rspamd_file_xmap (const char *fname, guint mode, gsize *size, + gboolean allow_symlink); /** * Map named shared memory segment |