[Bug 258411] blacklistctl dump fails shortly after first use
- In reply to: bugzilla-noreply_a_freebsd.org: "[Bug 258411] blacklistctl dump fails shortly after first use"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 17 Nov 2025 20:38:54 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258411
--- Comment #3 from Jose Luis Duran <jlduran@FreeBSD.org> ---
(In reply to Ed Maste from comment #2)
I'm not sure if I understood, but I'll open a report upstream and
cross-reference it with this Bugzilla PR.
Naively, I can think of something like:
--- a/contrib/blocklist/bin/blocklistd.c
+++ b/contrib/blocklist/bin/blocklistd.c
@@ -541,15 +541,17 @@ main(int argc, char *argv[])
state = state_open(dbfile, flags, 0600);
if (state == NULL)
state = state_open(dbfile, flags | O_CREAT, 0600);
+ else {
+ if (restore) {
+ if (!flush)
+ rules_flush();
+ rules_restore();
+ }
+ }
+
if (state == NULL)
return EXIT_FAILURE;
- if (restore) {
- if (!flush)
- rules_flush();
- rules_restore();
- }
-
if (!debug) {
if (daemon(0, 0) == -1)
err(EXIT_FAILURE, "daemon failed");
Because the errno that is triggering it is EFTYPE. So if we only try to
restore the rules if the file already exists, we can overcome this issue.
--
You are receiving this mail because:
You are the assignee for the bug.