Page MenuHomeFreeBSD

Add a new parameter to restrict jails from binding to privileged ports
ClosedPublic

Authored by allanjude on Mar 30 2017, 3:20 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 7, 9:35 AM
Unknown Object (File)
Sat, Apr 6, 1:12 PM
Unknown Object (File)
Thu, Mar 28, 8:00 PM
Unknown Object (File)
Feb 5 2024, 2:47 AM
Unknown Object (File)
Jan 20 2024, 9:16 AM
Unknown Object (File)
Jan 1 2024, 12:14 PM
Unknown Object (File)
Dec 23 2023, 2:40 AM
Unknown Object (File)
Nov 30 2023, 7:26 AM
Subscribers

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Some style nits but otherwise LGM

sys/kern/kern_jail.c
3314 ↗(On Diff #26830)

Personally I would remove the else, but this follows the existing file style.

usr.sbin/jail/config.c
101 ↗(On Diff #26830)

missing tab?

This revision is now accepted and ready to land.Mar 30 2017, 3:23 PM

LGTM, modulo the same nits as smh@.

allanjude added inline comments.
sys/kern/kern_jail.c
3314 ↗(On Diff #26830)

keeping this as-is, as it the style in the rest of this switch block

usr.sbin/jail/config.c
101 ↗(On Diff #26830)

it does line up with all of the other tabs, but fixing anyway

allanjude edited edge metadata.
allanjude marked 2 inline comments as done.

Fix style nits from smh@

This revision now requires review to proceed.Mar 30 2017, 11:08 PM
cem added inline comments.
usr.sbin/jail/config.c
101 ↗(On Diff #26848)

Was this really too wide?

This revision is now accepted and ready to land.Mar 30 2017, 11:12 PM
usr.sbin/jail/config.c
101 ↗(On Diff #26848)

If you look at the file in !phabricator, all of the 0s line up perfectly at the tab stop. due to the length of the allow MIB, there was no room for a tab without shifting to the next tab stop. so I did what the file had done for exec.system_jail_user

You don't need the KP_ALLOW_RESERVED_PORTS in jailp.h and config.c - you can just leave these files untouched. The KP_* defines are for parameters that are internally referenced somewhere within jail(8). That includes most of the allow.* parameters, only to handle back-compatibility with the security.jail.*_allowed sysctls.

The other changes (the kernel part) look good.

allanjude edited edge metadata.

Update with feedback from jamie@

This revision now requires review to proceed.Apr 8 2017, 1:38 AM
This revision is now accepted and ready to land.Apr 8 2017, 3:25 AM
This revision was automatically updated to reflect the committed changes.