Lines 199-204
Link Here
|
199 |
"allow.mount.fdescfs", |
199 |
"allow.mount.fdescfs", |
200 |
"allow.mount.linprocfs", |
200 |
"allow.mount.linprocfs", |
201 |
"allow.mount.linsysfs", |
201 |
"allow.mount.linsysfs", |
|
|
202 |
"allow.reserved_ports", |
202 |
}; |
203 |
}; |
203 |
const size_t pr_allow_names_size = sizeof(pr_allow_names); |
204 |
const size_t pr_allow_names_size = sizeof(pr_allow_names); |
204 |
|
205 |
|
Lines 218-227
Link Here
|
218 |
"allow.mount.nofdescfs", |
219 |
"allow.mount.nofdescfs", |
219 |
"allow.mount.nolinprocfs", |
220 |
"allow.mount.nolinprocfs", |
220 |
"allow.mount.nolinsysfs", |
221 |
"allow.mount.nolinsysfs", |
|
|
222 |
"allow.noreserved_ports", |
221 |
}; |
223 |
}; |
222 |
const size_t pr_allow_nonames_size = sizeof(pr_allow_nonames); |
224 |
const size_t pr_allow_nonames_size = sizeof(pr_allow_nonames); |
223 |
|
225 |
|
224 |
#define JAIL_DEFAULT_ALLOW PR_ALLOW_SET_HOSTNAME |
226 |
#define JAIL_DEFAULT_ALLOW (PR_ALLOW_SET_HOSTNAME | PR_ALLOW_RESERVED_PORTS) |
225 |
#define JAIL_DEFAULT_ENFORCE_STATFS 2 |
227 |
#define JAIL_DEFAULT_ENFORCE_STATFS 2 |
226 |
#define JAIL_DEFAULT_DEVFS_RSNUM 0 |
228 |
#define JAIL_DEFAULT_DEVFS_RSNUM 0 |
227 |
static unsigned jail_default_allow = JAIL_DEFAULT_ALLOW; |
229 |
static unsigned jail_default_allow = JAIL_DEFAULT_ALLOW; |
Lines 3304-3313
Link Here
|
3304 |
return (EPERM); |
3306 |
return (EPERM); |
3305 |
|
3307 |
|
3306 |
/* |
3308 |
/* |
3307 |
* Allow jailed root to bind reserved ports and reuse in-use |
3309 |
* Conditionally allow jailed root to bind reserved ports. |
3308 |
* ports. |
|
|
3309 |
*/ |
3310 |
*/ |
3310 |
case PRIV_NETINET_RESERVEDPORT: |
3311 |
case PRIV_NETINET_RESERVEDPORT: |
|
|
3312 |
if (cred->cr_prison->pr_allow & PR_ALLOW_RESERVED_PORTS) |
3313 |
return (0); |
3314 |
else |
3315 |
return (EPERM); |
3316 |
|
3317 |
/* |
3318 |
* Allow jailed root to reuse in-use ports. |
3319 |
*/ |
3311 |
case PRIV_NETINET_REUSEPORT: |
3320 |
case PRIV_NETINET_REUSEPORT: |
3312 |
return (0); |
3321 |
return (0); |
3313 |
|
3322 |
|
Lines 3788-3793
Link Here
|
3788 |
"B", "Jail may set file quotas"); |
3797 |
"B", "Jail may set file quotas"); |
3789 |
SYSCTL_JAIL_PARAM(_allow, socket_af, CTLTYPE_INT | CTLFLAG_RW, |
3798 |
SYSCTL_JAIL_PARAM(_allow, socket_af, CTLTYPE_INT | CTLFLAG_RW, |
3790 |
"B", "Jail may create sockets other than just UNIX/IPv4/IPv6/route"); |
3799 |
"B", "Jail may create sockets other than just UNIX/IPv4/IPv6/route"); |
|
|
3800 |
SYSCTL_JAIL_PARAM(_allow, reserved_ports, CTLTYPE_INT | CTLFLAG_RW, |
3801 |
"B", "Jail may bind sockets to reserved ports"); |
3791 |
|
3802 |
|
3792 |
SYSCTL_JAIL_PARAM_SUBNODE(allow, mount, "Jail mount/unmount permission flags"); |
3803 |
SYSCTL_JAIL_PARAM_SUBNODE(allow, mount, "Jail mount/unmount permission flags"); |
3793 |
SYSCTL_JAIL_PARAM(_allow_mount, , CTLTYPE_INT | CTLFLAG_RW, |
3804 |
SYSCTL_JAIL_PARAM(_allow_mount, , CTLTYPE_INT | CTLFLAG_RW, |