summaryrefslogtreecommitdiffstats
path: root/sys/fs/fdescfs/fdesc_vnops.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/fs/fdescfs/fdesc_vnops.c')
-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