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_jail.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_jail.c')
-rw-r--r-- | sys/kern/kern_jail.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index 266cd5e..90c9aa8 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -20,11 +20,20 @@ #include <sys/proc.h> #include <sys/jail.h> #include <sys/socket.h> +#include <sys/sysctl.h> #include <net/if.h> #include <netinet/in.h> MALLOC_DEFINE(M_PRISON, "prison", "Prison structures"); +SYSCTL_NODE(, OID_AUTO, jail, CTLFLAG_RW, 0, + "Jail rules"); + +int jail_set_hostname_allowed = 1; +SYSCTL_INT(_jail, OID_AUTO, set_hostname_allowed, CTLFLAG_RW, + &jail_set_hostname_allowed, 0, + "Processes in jail can set their hostnames"); + int jail(p, uap) struct proc *p; |