From e8fb8c14b5967d573ac36aa8c3a6fc4ac98543fb Mon Sep 17 00:00:00 2001 From: rwatson Date: Thu, 10 Feb 2000 18:51:58 +0000 Subject: Fix sysctl namespace for jail: move the kern.jailcansethostname to kern.prison.set_hostname_allowed, off of the kern.prison node. Future jail twiddles should be placed in this namespace. --- sys/kern/kern_mib.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sys/kern/kern_mib.c') diff --git a/sys/kern/kern_mib.c b/sys/kern/kern_mib.c index c93cc6f..84ca34a 100644 --- a/sys/kern/kern_mib.c +++ b/sys/kern/kern_mib.c @@ -145,10 +145,10 @@ static char machine_arch[] = MACHINE_ARCH; SYSCTL_STRING(_hw, HW_MACHINE_ARCH, machine_arch, CTLFLAG_RD, machine_arch, 0, "System architecture"); -static int jailcansethostname=1; -SYSCTL_INT(_kern, KERN_JAILCANSETHOSTNAME, jailcansethostname, - CTLFLAG_RW, &jailcansethostname, 0, - "Jail can set its hostname"); +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]; @@ -158,7 +158,7 @@ sysctl_hostname SYSCTL_HANDLER_ARGS int error; if (req->p->p_prison) { - if (!jailcansethostname) + if (!prison_set_hostname_allowed) return(EPERM); error = sysctl_handle_string(oidp, req->p->p_prison->pr_host, -- cgit v1.1