summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjamie <jamie@FreeBSD.org>2009-05-05 05:49:08 +0000
committerjamie <jamie@FreeBSD.org>2009-05-05 05:49:08 +0000
commit8e4ffe653f6c9ff6da3eed58566ef35e77d530d0 (patch)
treec0ef785a079102ee31038e85f4050b35384574e2 /sys
parent4ba113b1780a1a5a8e5b588fbd6c627e15adeb0d (diff)
downloadFreeBSD-src-8e4ffe653f6c9ff6da3eed58566ef35e77d530d0.zip
FreeBSD-src-8e4ffe653f6c9ff6da3eed58566ef35e77d530d0.tar.gz
Add a constant PR_MAXMETHOD to better define the jail/OSD interface.
Reviewed by: dchagin, kib Approved by: bz (mentor)
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_osd.c3
-rw-r--r--sys/sys/jail.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/kern_osd.c b/sys/kern/kern_osd.c
index 1cb83e4..2ce6b6b 100644
--- a/sys/kern/kern_osd.c
+++ b/sys/kern/kern_osd.c
@@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$");
#include <sys/systm.h>
#include <sys/sysctl.h>
#include <sys/errno.h>
+#include <sys/jail.h>
#include <sys/malloc.h>
#include <sys/lock.h>
#include <sys/mutex.h>
@@ -73,7 +74,7 @@ static osd_method_t *osd_methods[OSD_LAST + 1]; /* (m) */
static u_int osd_nslots[OSD_LAST + 1]; /* (m) */
static osd_destructor_t *osd_destructors[OSD_LAST + 1]; /* (o) */
static const u_int osd_nmethods[OSD_LAST + 1] = {
- [OSD_JAIL] = 5,
+ [OSD_JAIL] = PR_MAXMETHOD,
};
static struct sx osd_module_lock[OSD_LAST + 1];
diff --git a/sys/sys/jail.h b/sys/sys/jail.h
index d30701b..f97d87a 100644
--- a/sys/sys/jail.h
+++ b/sys/sys/jail.h
@@ -189,6 +189,7 @@ struct prison {
#define PR_METHOD_SET 2
#define PR_METHOD_CHECK 3
#define PR_METHOD_ATTACH 4
+#define PR_MAXMETHOD 5
/*
* Sysctl-set variables that determine global jail policy
OpenPOWER on IntegriCloud