summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/sys/capsicum.h
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/sys/sys/capsicum.h')
-rw-r--r--freebsd/sys/sys/capsicum.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/freebsd/sys/sys/capsicum.h b/freebsd/sys/sys/capsicum.h
index bf97d0b2..d40b8572 100644
--- a/freebsd/sys/sys/capsicum.h
+++ b/freebsd/sys/sys/capsicum.h
@@ -471,7 +471,13 @@ u_char cap_rights_to_vmprot(const cap_rights_t *havep);
/*
* For the purposes of procstat(1) and similar tools, allow kern_descrip.c to
* extract the rights from a capability.
+ *
+ * Dereferencing fdep requires filedesc.h, but including it would cause
+ * significant pollution. Instead add a macro for consumers which want it,
+ * most notably kern_descrip.c.
*/
+#define cap_rights_fde_inline(fdep) (&(fdep)->fde_rights)
+
const cap_rights_t *cap_rights_fde(const struct filedescent *fde);
const cap_rights_t *cap_rights(struct filedesc *fdp, int fd);