summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_mib.c
diff options
context:
space:
mode:
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