summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_mib.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2000-02-10 18:51:58 +0000
committerrwatson <rwatson@FreeBSD.org>2000-02-10 18:51:58 +0000
commite8fb8c14b5967d573ac36aa8c3a6fc4ac98543fb (patch)
treedd667fea70f62db1cb94313e0c7ce2a56f803b06 /sys/kern/kern_mib.c
parente8b624173afd0d3abbffcee785b504b298ae4b4b (diff)
downloadFreeBSD-src-e8fb8c14b5967d573ac36aa8c3a6fc4ac98543fb.zip
FreeBSD-src-e8fb8c14b5967d573ac36aa8c3a6fc4ac98543fb.tar.gz
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.
Diffstat (limited to 'sys/kern/kern_mib.c')
-rw-r--r--sys/kern/kern_mib.c10
1 files changed, 5 insertions, 5 deletions
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,
OpenPOWER on IntegriCloud