summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjamie <jamie@FreeBSD.org>2009-06-24 15:32:57 +0000
committerjamie <jamie@FreeBSD.org>2009-06-24 15:32:57 +0000
commitc69eb23003f99db41045c3bb4dcc6d922839a1bd (patch)
treecc3552aa8cec02a26c6b2188c5f3313278fef933
parent5c8985f2c994d85cbb9f83532093a1c8fb8f92a2 (diff)
downloadFreeBSD-src-c69eb23003f99db41045c3bb4dcc6d922839a1bd.zip
FreeBSD-src-c69eb23003f99db41045c3bb4dcc6d922839a1bd.tar.gz
Clean up struct prison, with the recent fields in more logical places,
and room for future expansion. Approved by: bz (mentor)
-rw-r--r--sys/sys/jail.h28
1 files changed, 15 insertions, 13 deletions
diff --git a/sys/sys/jail.h b/sys/sys/jail.h
index 74d5247..117e134 100644
--- a/sys/sys/jail.h
+++ b/sys/sys/jail.h
@@ -149,30 +149,32 @@ struct prison {
int pr_ref; /* (p) refcount */
int pr_uref; /* (p) user (alive) refcount */
unsigned pr_flags; /* (p) PR_* flags */
- char pr_path[MAXPATHLEN]; /* (c) chroot path */
- struct cpuset *pr_cpuset; /* (p) cpuset */
- struct vnode *pr_root; /* (c) vnode to rdir */
- char pr_hostname[MAXHOSTNAMELEN]; /* (p) jail hostname */
- char pr_name[MAXHOSTNAMELEN]; /* (p) admin jail name */
+ LIST_HEAD(, prison) pr_children; /* (a) list of child jails */
+ LIST_ENTRY(prison) pr_sibling; /* (a) next in parent's list */
struct prison *pr_parent; /* (c) containing jail */
- int pr_securelevel; /* (p) securelevel */
- struct task pr_task; /* (d) destroy task */
struct mtx pr_mtx;
+ struct task pr_task; /* (d) destroy task */
struct osd pr_osd; /* (p) additional data */
+ struct cpuset *pr_cpuset; /* (p) cpuset */
+ struct vnet *pr_vnet; /* (c) network stack */
+ struct vnode *pr_root; /* (c) vnode to rdir */
int pr_ip4s; /* (p) number of v4 IPs */
- struct in_addr *pr_ip4; /* (p) v4 IPs of jail */
int pr_ip6s; /* (p) number of v6 IPs */
+ struct in_addr *pr_ip4; /* (p) v4 IPs of jail */
struct in6_addr *pr_ip6; /* (p) v6 IPs of jail */
- LIST_HEAD(, prison) pr_children; /* (a) list of child jails */
- LIST_ENTRY(prison) pr_sibling; /* (a) next in parent's list */
+ void *pr_sparep[4];
int pr_childcount; /* (a) number of child jails */
+ int pr_childmax; /* (p) maximum child jails */
unsigned pr_allow; /* (p) PR_ALLOW_* flags */
+ int pr_securelevel; /* (p) securelevel */
int pr_enforce_statfs; /* (p) statfs permission */
+ int pr_spare[5];
+ unsigned long pr_hostid; /* (p) jail hostid */
+ char pr_name[MAXHOSTNAMELEN]; /* (p) admin jail name */
+ char pr_path[MAXPATHLEN]; /* (c) chroot path */
+ char pr_hostname[MAXHOSTNAMELEN]; /* (p) jail hostname */
char pr_domainname[MAXHOSTNAMELEN]; /* (p) jail domainname */
char pr_hostuuid[HOSTUUIDLEN]; /* (p) jail hostuuid */
- unsigned long pr_hostid; /* (p) jail hostid */
- struct vnet *pr_vnet; /* (c) network stack */
- int pr_childmax; /* (p) maximum child jails */
};
#endif /* _KERNEL || _WANT_PRISON */
OpenPOWER on IntegriCloud