Bug 258411

Summary: blacklistctl dump fails shortly after first use
Product: Base System Reporter: Ed Maste <emaste>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: New ---    
Severity: Affects Only Me    
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   

Description Ed Maste freebsd_committer freebsd_triage 2021-09-10 17:41:16 UTC
When starting blacklistd for the first time an empty /var/db/blacklistd.db file is created, and `blacklistctl dump` produces an error in this case:

# service blacklistd start
Starting blacklistd.
# ls -l /var/db/blacklistd.db 
-rw-------  1 root  wheel  0 Sep 10 17:38 /var/db/blacklistd.db
# blacklistctl dump
state_open: can't open `/var/db/blacklistd.db' (Inappropriate file type or format)
blacklistctl: Can't open `/var/db/blacklistd.db': Inappropriate file type or format

After a short while data is written, and `blacklistctl dump` reports an empty list:

# blacklistctl dump
        address/ma:port id      nfail   last access