Changeset View
Changeset View
Standalone View
Standalone View
sys/rpc/rpc_generic.c
Show All 39 Lines | |||||
/* | /* | ||||
* rpc_generic.c, Miscl routines for RPC. | * rpc_generic.c, Miscl routines for RPC. | ||||
* | * | ||||
*/ | */ | ||||
#include "opt_inet6.h" | #include "opt_inet6.h" | ||||
#include <sys/param.h> | #include <sys/param.h> | ||||
#include <sys/jail.h> | |||||
#include <sys/kernel.h> | #include <sys/kernel.h> | ||||
#include <sys/malloc.h> | #include <sys/malloc.h> | ||||
#include <sys/mbuf.h> | #include <sys/mbuf.h> | ||||
#include <sys/module.h> | #include <sys/module.h> | ||||
#include <sys/osd.h> | |||||
#include <sys/proc.h> | #include <sys/proc.h> | ||||
#include <sys/protosw.h> | #include <sys/protosw.h> | ||||
#include <sys/sbuf.h> | #include <sys/sbuf.h> | ||||
#include <sys/systm.h> | #include <sys/systm.h> | ||||
#include <sys/socket.h> | #include <sys/socket.h> | ||||
#include <sys/socketvar.h> | #include <sys/socketvar.h> | ||||
#include <sys/syslog.h> | #include <sys/syslog.h> | ||||
▲ Show 20 Lines • Show All 900 Lines • ▼ Show 20 Lines | |||||
/* | /* | ||||
* Kernel module glue | * Kernel module glue | ||||
*/ | */ | ||||
static int | static int | ||||
krpc_modevent(module_t mod, int type, void *data) | krpc_modevent(module_t mod, int type, void *data) | ||||
{ | { | ||||
int error = 0; | int error = 0; | ||||
osd_method_t methods[PR_MAXMETHOD] = { | |||||
[PR_METHOD_REMOVE] = rpctls_prison_cleanup, | |||||
}; | |||||
switch (type) { | switch (type) { | ||||
case MOD_LOAD: | case MOD_LOAD: | ||||
error = rpctls_init(); | error = rpctls_init(); | ||||
/* XXX-BZ OSD to VNET? */ | |||||
if (error == 0) | |||||
osd_jail_register(NULL, methods); | |||||
break; | break; | ||||
case MOD_UNLOAD: | case MOD_UNLOAD: | ||||
/* | /* | ||||
* Cannot be unloaded, since the rpctlssd or rpctlscd daemons | * Cannot be unloaded, since the rpctlssd or rpctlscd daemons | ||||
* might be performing a rpctls syscall. | * might be performing a rpctls syscall. | ||||
*/ | */ | ||||
/* FALLTHROUGH */ | /* FALLTHROUGH */ | ||||
default: | default: | ||||
Show All 14 Lines |