diff options
author | attilio <attilio@FreeBSD.org> | 2013-03-02 14:48:41 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2013-03-02 14:48:41 +0000 |
commit | e98f58faf63a90d85e0e2ad78353915f9615a4eb (patch) | |
tree | b9feaa4bea034f2e9d11c7eb34aa95c672a3a86b /sys/cddl/compat | |
parent | bcc31f462ba76b89e3789cb24393126466e3775d (diff) | |
parent | 5d33901b24a0ca4496b12ca2299df4b62dfdfd35 (diff) | |
download | FreeBSD-src-e98f58faf63a90d85e0e2ad78353915f9615a4eb.zip FreeBSD-src-e98f58faf63a90d85e0e2ad78353915f9615a4eb.tar.gz |
MFC
Diffstat (limited to 'sys/cddl/compat')
-rw-r--r-- | sys/cddl/compat/opensolaris/sys/file.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/cddl/compat/opensolaris/sys/file.h b/sys/cddl/compat/opensolaris/sys/file.h index 7a3df36..0b8f875 100644 --- a/sys/cddl/compat/opensolaris/sys/file.h +++ b/sys/cddl/compat/opensolaris/sys/file.h @@ -39,15 +39,11 @@ typedef struct file file_t; #include <sys/capability.h> static __inline file_t * -getf(int fd) +getf(int fd, cap_rights_t rights) { struct file *fp; - /* - * We wouldn't need all of these rights on every invocation - * if we had more information about intent. - */ - if (fget(curthread, fd, CAP_READ | CAP_WRITE | CAP_SEEK, &fp) == 0) + if (fget(curthread, fd, rights, &fp) == 0) return (fp); return (NULL); } |