summaryrefslogtreecommitdiffstats
path: root/sys/fs/fdescfs
diff options
context:
space:
mode:
authormjg <mjg@FreeBSD.org>2015-07-05 19:05:16 +0000
committermjg <mjg@FreeBSD.org>2015-07-05 19:05:16 +0000
commitfeeee4c707ab28bab6cd1180144cef39832a1026 (patch)
tree722b04d655f398679c92441c3c43074c329a9d73 /sys/fs/fdescfs
parent35acf35c2e04ac9da20ebfb09e37b5b73f2b04fa (diff)
downloadFreeBSD-src-feeee4c707ab28bab6cd1180144cef39832a1026.zip
FreeBSD-src-feeee4c707ab28bab6cd1180144cef39832a1026.tar.gz
fd: make 'rights' a manadatory argument to fget* functions
Diffstat (limited to 'sys/fs/fdescfs')
-rw-r--r--sys/fs/fdescfs/fdesc_vnops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/fs/fdescfs/fdesc_vnops.c b/sys/fs/fdescfs/fdesc_vnops.c
index 15f3bd4..1b0e569 100644
--- a/sys/fs/fdescfs/fdesc_vnops.c
+++ b/sys/fs/fdescfs/fdesc_vnops.c
@@ -288,6 +288,7 @@ fdesc_lookup(ap)
struct thread *td = cnp->cn_thread;
struct file *fp;
struct fdesc_get_ino_args arg;
+ cap_rights_t rights;
int nlen = cnp->cn_namelen;
u_int fd, fd1;
int error;
@@ -332,7 +333,7 @@ fdesc_lookup(ap)
/*
* No rights to check since 'fp' isn't actually used.
*/
- if ((error = fget(td, fd, NULL, &fp)) != 0)
+ if ((error = fget(td, fd, cap_rights_init(&rights), &fp)) != 0)
goto bad;
/* Check if we're looking up ourselves. */
OpenPOWER on IntegriCloud