summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2005-03-20 10:33:27 +0000
committerpjd <pjd@FreeBSD.org>2005-03-20 10:33:27 +0000
commit26ccbbe0103e9179d4bbf18cf158b0f163759bbe (patch)
treeb12a943907190252677444fc68d29e79bcae780a
parent3adfed4ac4f3f6731adda700d863d34bafdf290f (diff)
downloadFreeBSD-src-26ccbbe0103e9179d4bbf18cf158b0f163759bbe.zip
FreeBSD-src-26ccbbe0103e9179d4bbf18cf158b0f163759bbe.tar.gz
Make prison structure visible from userland if _WANT_PRISON is defined
(simlar to _WANT_UCRED). Reviewed by: gad MFC after: 3 days
-rw-r--r--sys/sys/jail.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/sys/jail.h b/sys/sys/jail.h
index b403b14..73d6940 100644
--- a/sys/sys/jail.h
+++ b/sys/sys/jail.h
@@ -46,6 +46,7 @@ int jail_attach(int);
#ifdef MALLOC_DECLARE
MALLOC_DECLARE(M_PRISON);
#endif
+#endif /* _KERNEL */
/*
* This structure describes a prison. It is pointed to by all struct
@@ -59,6 +60,7 @@ MALLOC_DECLARE(M_PRISON);
* required to read
* (d) set only during destruction of jail, no mutex needed
*/
+#if defined(_KERNEL) || defined(_WANT_PRISON)
struct prison {
LIST_ENTRY(prison) pr_list; /* (a) all prisons */
int pr_id; /* (c) prison id */
@@ -72,7 +74,9 @@ struct prison {
struct task pr_task; /* (d) destroy task */
struct mtx pr_mtx;
};
+#endif /* _KERNEL || _WANT_PRISON */
+#ifdef _KERNEL
/*
* Sysctl-set variables that determine global jail policy
*
@@ -105,5 +109,5 @@ int prison_if(struct ucred *cred, struct sockaddr *sa);
int prison_ip(struct ucred *cred, int flag, u_int32_t *ip);
void prison_remote_ip(struct ucred *cred, int flags, u_int32_t *ip);
-#endif /* !_KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_JAIL_H_ */
OpenPOWER on IntegriCloud