}
globbuf.gl_offs = 0;
+ /*
+ * We reuse this buffer for .new patterns as well, so allocate with some
+ * margin
+ */
len = strlen (ctx->hs_dir) + 1 + sizeof ("*.hs.new") + 2;
pattern = g_malloc (len);
rspamd_snprintf (pattern, len, "%s%c%s", ctx->hs_dir, G_DIR_SEPARATOR, "*.hs");
strerror (errno));
ret = FALSE;
}
+ else {
+ msg_notice ("successfully removed outdated hyperscan file: %s",
+ globbuf.gl_pathv[i]);
+ }
}
}
}
strerror(errno));
ret = FALSE;
}
+ else {
+ msg_notice ("successfully removed outdated hyperscan temporary file: %s; "
+ "pid of the file creator process: %P",
+ globbuf.gl_pathv[i],
+ foreign_pid);
+ }
+ }
+ else {
+ msg_notice ("skip removal of the hyperscan temporary file: %s; "
+ "pid of the file creator process: %P",
+ globbuf.gl_pathv[i],
+ foreign_pid);
}
}
}
len = strlen (path);
if (len < sizeof (rspamd_cryptobox_HASHBYTES + 3)) {
+ if (!silent) {
+ msg_err_re_cache ("cannot open hyperscan cache file %s: too short filename",
+ path);
+ }
return FALSE;
}
if (memcmp (path + len - 3, ".hs", 3) != 0) {
+ if (!silent) {
+ msg_err_re_cache ("cannot open hyperscan cache file %s: not ending with .hs",
+ path);
+ }
return FALSE;
}