aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-09-09 16:26:16 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-09-09 16:26:16 +0100
commit56e236efa012c4be6b3893314ce4d3a570e16327 (patch)
treed578ac358f7ae3cb4e303af195def103e55a311c /src/libutil
parent4283a774fdfd5582ab516387a7a77969c40bb56f (diff)
downloadrspamd-56e236efa012c4be6b3893314ce4d3a570e16327.tar.gz
rspamd-56e236efa012c4be6b3893314ce4d3a570e16327.zip
[Rework] No more magic
Diffstat (limited to 'src/libutil')
-rw-r--r--src/libutil/util.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/src/libutil/util.c b/src/libutil/util.c
index 86358e46e..7877582c2 100644
--- a/src/libutil/util.c
+++ b/src/libutil/util.c
@@ -2364,35 +2364,6 @@ rspamd_init_libs (void)
rlim.rlim_max = rlim.rlim_cur;
setrlimit (RLIMIT_STACK, &rlim);
- gint magic_flags = 0;
-
- /* Unless trusty and other crap is supported... */
-#if 0
-#ifdef MAGIC_NO_CHECK_BUILTIN
- magic_flags = MAGIC_NO_CHECK_BUILTIN;
-#endif
-#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
-#ifdef MAGIC_NO_CHECK_ENCODING
- magic_flags |= MAGIC_NO_CHECK_ENCODING;
-#endif
-#ifdef MAGIC_NO_CHECK_TAR
- magic_flags |= MAGIC_NO_CHECK_TAR;
-#endif
-#ifdef MAGIC_NO_CHECK_TEXT
- magic_flags |= MAGIC_NO_CHECK_TEXT;
-#endif
-#ifdef MAGIC_NO_CHECK_TOKENS
- magic_flags |= MAGIC_NO_CHECK_TOKENS;
-#endif
-#ifdef MAGIC_NO_CHECK_JSON
- magic_flags |= MAGIC_NO_CHECK_JSON;
-#endif
- ctx->libmagic = magic_open (magic_flags);
ctx->local_addrs = rspamd_inet_library_init ();
REF_INIT_RETAIN (ctx, rspamd_deinit_libs);
@@ -2473,10 +2444,6 @@ rspamd_config_libs (struct rspamd_external_libs_ctx *ctx,
}
}
- if (ctx->libmagic) {
- magic_load (ctx->libmagic, cfg->magic_file);
- }
-
rspamd_free_zstd_dictionary (ctx->in_dict);
rspamd_free_zstd_dictionary (ctx->out_dict);
@@ -2586,10 +2553,6 @@ void
rspamd_deinit_libs (struct rspamd_external_libs_ctx *ctx)
{
if (ctx != NULL) {
- if (ctx->libmagic) {
- magic_close (ctx->libmagic);
- }
-
g_free (ctx->ottery_cfg);
#ifdef HAVE_OPENSSL