commit 1d6b8f1: [Minor] Fucking trusty...

Vsevolod Stakhov vsevolod at highsecure.ru
Thu Dec 27 18:28:06 UTC 2018


Author: Vsevolod Stakhov
Date: 2018-12-11 12:53:25 +0000
URL: https://github.com/rspamd/rspamd/commit/1d6b8f15aae0e77ae289fa9c0451242bc0c92522

[Minor] Fucking trusty...

---
 src/libutil/util.c | 11 ++++++-----
 1 file 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
@@ -2154,9 +2158,6 @@ rspamd_init_libs (void)
 #endif
 #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 ();


More information about the Commits mailing list