diff options
author | mjg <mjg@FreeBSD.org> | 2014-07-23 19:33:49 +0000 |
---|---|---|
committer | mjg <mjg@FreeBSD.org> | 2014-07-23 19:33:49 +0000 |
commit | cc95000af61296b985c1c678b6bc27bd2793810e (patch) | |
tree | 7db20362cc049686c71d5e7807da2dd01bf7c2e8 /sys/sys/capsicum.h | |
parent | e3c2364715efe81098de0761c4cc806688b2293a (diff) | |
download | FreeBSD-src-cc95000af61296b985c1c678b6bc27bd2793810e.zip FreeBSD-src-cc95000af61296b985c1c678b6bc27bd2793810e.tar.gz |
Prepare fget_unlocked for reading fd table only once.
Some capsicum functions accept fdp + fd and lookup fde based on that.
Add variants which accept fde.
Reviewed by: pjd
MFC after: 1 week
Diffstat (limited to 'sys/sys/capsicum.h')
-rw-r--r-- | sys/sys/capsicum.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/sys/capsicum.h b/sys/sys/capsicum.h index 4942f8d..6188811 100644 --- a/sys/sys/capsicum.h +++ b/sys/sys/capsicum.h @@ -341,6 +341,7 @@ __END_DECLS #define IN_CAPABILITY_MODE(td) (((td)->td_ucred->cr_flags & CRED_FLAG_CAPMODE) != 0) struct filedesc; +struct filedescent; /* * Test whether a capability grants the requested rights. @@ -355,9 +356,11 @@ u_char cap_rights_to_vmprot(cap_rights_t *havep); * For the purposes of procstat(1) and similar tools, allow kern_descrip.c to * extract the rights from a capability. */ +cap_rights_t *cap_rights_fde(struct filedescent *fde); cap_rights_t *cap_rights(struct filedesc *fdp, int fd); int cap_ioctl_check(struct filedesc *fdp, int fd, u_long cmd); +int cap_fcntl_check_fde(struct filedescent *fde, int cmd); int cap_fcntl_check(struct filedesc *fdp, int fd, int cmd); #else /* !_KERNEL */ |