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)
Sat, Jul 4, 11:13 AM
Unknown Object (File)
Sat, Jul 4, 11:09 AM
Unknown Object (File)
Sat, Jul 4, 5:13 AM
Unknown Object (File)
Sat, Jul 4, 5:10 AM
Unknown Object (File)
Fri, Jul 3, 10:05 PM
Unknown Object (File)
Fri, Jul 3, 10:03 PM
Unknown Object (File)
Fri, Jul 3, 5:41 PM
Unknown Object (File)
Fri, Jul 3, 5:38 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 Not Applicable
Unit
Tests Not Applicable

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.