https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258411
--- Comment #3 from Jose Luis Duran <[email protected]> --- (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.
