summaryrefslogtreecommitdiffstats
path: root/sys/cddl/compat
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2013-03-02 14:48:41 +0000
committerattilio <attilio@FreeBSD.org>2013-03-02 14:48:41 +0000
commite98f58faf63a90d85e0e2ad78353915f9615a4eb (patch)
treeb9feaa4bea034f2e9d11c7eb34aa95c672a3a86b /sys/cddl/compat
parentbcc31f462ba76b89e3789cb24393126466e3775d (diff)
parent5d33901b24a0ca4496b12ca2299df4b62dfdfd35 (diff)
downloadFreeBSD-src-e98f58faf63a90d85e0e2ad78353915f9615a4eb.zip
FreeBSD-src-e98f58faf63a90d85e0e2ad78353915f9615a4eb.tar.gz
MFC
Diffstat (limited to 'sys/cddl/compat')
-rw-r--r--sys/cddl/compat/opensolaris/sys/file.h8
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);
}
OpenPOWER on IntegriCloud