diff options
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/fdescfs/fdesc_vnops.c | 3 |
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. */ |