diff options
author | rwatson <rwatson@FreeBSD.org> | 2000-02-12 13:41:56 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2000-02-12 13:41:56 +0000 |
commit | 512d99359fec3621b39f3c2fb6f8b8c51b1565ce (patch) | |
tree | f5fcf0374fc02d9739cb0616ef2e8f5226ec32a7 /sys/kern/kern_mib.c | |
parent | 716214e9d70e2be6625e19a3b8cd104874bfb62b (diff) | |
download | FreeBSD-src-512d99359fec3621b39f3c2fb6f8b8c51b1565ce.zip FreeBSD-src-512d99359fec3621b39f3c2fb6f8b8c51b1565ce.tar.gz |
Yet-another-update: rename ``kern.prison'' to a new sysctl root entry,
``jail'', and move the set_hostname_allowed sysctl there, as well as
fixing a bug in the sysctl that resulted in jails being over-limited
(preventing them from reading as well as writing the hostname). Also,
correct some formatting issues, courtesy bde :-).
Reviewed by: phk
Approved by: jkh
Diffstat (limited to 'sys/kern/kern_mib.c')
-rw-r--r-- | sys/kern/kern_mib.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/sys/kern/kern_mib.c b/sys/kern/kern_mib.c index 84ca34a..2d5217c 100644 --- a/sys/kern/kern_mib.c +++ b/sys/kern/kern_mib.c @@ -77,9 +77,6 @@ SYSCTL_NODE(, CTL_P1003_1B, p1003_1b, CTLFLAG_RW, 0, SYSCTL_NODE(, OID_AUTO, compat, CTLFLAG_RW, 0, "Compatibility code"); -SYSCTL_NODE(_kern, OID_AUTO, prison, CTLFLAG_RW, 0, - "Prison rules"); - SYSCTL_STRING(_kern, KERN_OSRELEASE, osrelease, CTLFLAG_RD, osrelease, 0, "Operating system type"); @@ -145,11 +142,6 @@ static char machine_arch[] = MACHINE_ARCH; SYSCTL_STRING(_hw, HW_MACHINE_ARCH, machine_arch, CTLFLAG_RD, machine_arch, 0, "System architecture"); -static int prison_set_hostname_allowed = 1; -SYSCTL_INT(_kern_prison, OID_AUTO, set_hostname_allowed, CTLFLAG_RW, - &prison_set_hostname_allowed, 0, - "Processes in prison can set their hostnames"); - char hostname[MAXHOSTNAMELEN]; static int @@ -158,7 +150,7 @@ sysctl_hostname SYSCTL_HANDLER_ARGS int error; if (req->p->p_prison) { - if (!prison_set_hostname_allowed) + if (!jail_set_hostname_allowed && req->newptr) return(EPERM); error = sysctl_handle_string(oidp, req->p->p_prison->pr_host, |