Page MenuHomeFreeBSD

rc.firewall: Support on-disk lists
ClosedPublic

Authored by des on Fri, Jun 19, 6:54 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jun 26, 1:20 PM
Unknown Object (File)
Thu, Jun 25, 10:19 PM
Unknown Object (File)
Thu, Jun 25, 11:20 AM
Unknown Object (File)
Wed, Jun 24, 1:57 PM
Unknown Object (File)
Wed, Jun 24, 1:33 AM
Unknown Object (File)
Wed, Jun 24, 12:22 AM
Unknown Object (File)
Tue, Jun 23, 1:06 AM
Unknown Object (File)
Mon, Jun 22, 1:29 PM

Details

Summary

For firewall_allowservices and firewall_trusted, if an element of the
list looks like an absolute path, read the file, skipping comments and
blank lines, and treat the first word on each line as an address or
subnet to be added to the list.

We should probably be using tables instead, but this is still an
improvement over the status quo ante.

MFC after: 1 week
Relnotes: yes

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 74254
Build 71137: arc lint + arc unit

Event Timeline

des requested review of this revision.Fri, Jun 19, 6:54 PM
allanjude added inline comments.
libexec/rc/rc.firewall
474

Should we require that files be absolute paths, so that there isn't the chance of "accidentally" loading a file that happens to have a name collision with an hostname or ip address?

des edited the summary of this revision. (Show Details)

I forgot there were two lists...

des marked an inline comment as done.Thu, Jun 25, 3:48 PM
This revision is now accepted and ready to land.Fri, Jun 26, 2:21 PM
This revision was automatically updated to reflect the committed changes.