aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/util.c')
-rw-r--r--src/libutil/util.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/libutil/util.c b/src/libutil/util.c
index eb382c9bc..d69365b6f 100644
--- a/src/libutil/util.c
+++ b/src/libutil/util.c
@@ -2134,9 +2134,13 @@ rspamd_init_libs (void)
rlim.rlim_max = rlim.rlim_cur;
setrlimit (RLIMIT_STACK, &rlim);
- gint magic_flags = MAGIC_MIME|MAGIC_NO_CHECK_COMPRESS|
- MAGIC_NO_CHECK_ELF|MAGIC_NO_CHECK_TAR;
+ gint magic_flags = 0;
+#ifdef MAGIC_NO_CHECK_BUILTIN
+ magic_flags = MAGIC_NO_CHECK_BUILTIN;
+#endif
+ magic_flags |= MAGIC_MIME|MAGIC_NO_CHECK_COMPRESS|
+ MAGIC_NO_CHECK_ELF|MAGIC_NO_CHECK_TAR;
#ifdef MAGIC_NO_CHECK_CDF
magic_flags |= MAGIC_NO_CHECK_CDF;
#endif
@@ -2155,9 +2159,6 @@ rspamd_init_libs (void)
#ifdef MAGIC_NO_CHECK_JSON
magic_flags |= MAGIC_NO_CHECK_JSON;
#endif
-#ifdef MAGIC_NO_CHECK_BUILTIN
- magic_flags |= MAGIC_NO_CHECK_BUILTIN;
-#endif
ctx->libmagic = magic_open (magic_flags);
ctx->local_addrs = rspamd_inet_library_init ();
REF_INIT_RETAIN (ctx, rspamd_deinit_libs);