@profullstack/threatcrush 0.13.23 → 0.13.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/daemon.js +9 -1
- package/dist/daemon.js.map +1 -1
- package/dist/index.js +466 -376
- package/dist/index.js.map +1 -1
- package/dist/systemd/threatcrushd.service +7 -1
- package/package.json +1 -1
package/dist/daemon.js
CHANGED
|
@@ -16811,7 +16811,11 @@ var Fail2banAdapter = class {
|
|
|
16811
16811
|
""
|
|
16812
16812
|
].join("\n")
|
|
16813
16813
|
);
|
|
16814
|
-
|
|
16814
|
+
try {
|
|
16815
|
+
this.client(["reload", this.jail]);
|
|
16816
|
+
} catch {
|
|
16817
|
+
this.client(["reload"]);
|
|
16818
|
+
}
|
|
16815
16819
|
this.jailReady = true;
|
|
16816
16820
|
}
|
|
16817
16821
|
async block(ip) {
|
|
@@ -17069,6 +17073,10 @@ function isSuccessfulAuth(message) {
|
|
|
17069
17073
|
}
|
|
17070
17074
|
function explainBlockFailure(err, backend) {
|
|
17071
17075
|
const raw = err.message || String(err);
|
|
17076
|
+
if (/EROFS|read-only file system/i.test(raw)) {
|
|
17077
|
+
const path = /open '([^']+)'/.exec(raw)?.[1];
|
|
17078
|
+
return `threatcrushd cannot write ${path ?? "its firewall config"} for ${backend}: the systemd unit mounts it read-only. Reinstall the unit and restart: sudo $(which threatcrush) install-service && sudo systemctl restart threatcrushd`;
|
|
17079
|
+
}
|
|
17072
17080
|
const denied = /not permitted|EACCES|EPERM|permission denied|must be root/i.test(raw);
|
|
17073
17081
|
if (!denied) return `${raw} (backend: ${backend})`;
|
|
17074
17082
|
const who = typeof process.getuid === "function" && process.getuid() === 0 ? "as root" : `as uid ${typeof process.getuid === "function" ? process.getuid() : "?"}`;
|