diff options
author | mjg <mjg@FreeBSD.org> | 2015-06-16 09:52:36 +0000 |
---|---|---|
committer | mjg <mjg@FreeBSD.org> | 2015-06-16 09:52:36 +0000 |
commit | a5a3a94b02f2b62a521d49f600b762567d4f8451 (patch) | |
tree | 345352bf010aed96b00945e57e253feda213dd76 /sys/ofed | |
parent | 1b5e46102cb321470ac57b25aeac1c8febd34655 (diff) | |
download | FreeBSD-src-a5a3a94b02f2b62a521d49f600b762567d4f8451.zip FreeBSD-src-a5a3a94b02f2b62a521d49f600b762567d4f8451.tar.gz |
fd: make rights a mandatory argument to fget_unlocked
Diffstat (limited to 'sys/ofed')
-rw-r--r-- | sys/ofed/include/linux/file.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/sys/ofed/include/linux/file.h b/sys/ofed/include/linux/file.h index f1a7398..e2cebab 100644 --- a/sys/ofed/include/linux/file.h +++ b/sys/ofed/include/linux/file.h @@ -33,6 +33,7 @@ #include <sys/file.h> #include <sys/filedesc.h> #include <sys/refcount.h> +#include <sys/capsicum.h> #include <sys/proc.h> #include <linux/fs.h> @@ -46,10 +47,11 @@ extern struct fileops linuxfileops; static inline struct linux_file * linux_fget(unsigned int fd) { + cap_rights_t rights; struct file *file; - if (fget_unlocked(curthread->td_proc->p_fd, fd, NULL, &file, - NULL) != 0) { + if (fget_unlocked(curthread->td_proc->p_fd, fd, + cap_rights_init(&rights), &file, NULL) != 0) { return (NULL); } return (struct linux_file *)file->f_data; @@ -71,10 +73,11 @@ fput(struct linux_file *filp) static inline void put_unused_fd(unsigned int fd) { + cap_rights_t rights; struct file *file; - if (fget_unlocked(curthread->td_proc->p_fd, fd, NULL, &file, - NULL) != 0) { + if (fget_unlocked(curthread->td_proc->p_fd, fd, + cap_rights_init(&rights), &file, NULL) != 0) { return; } /* @@ -91,10 +94,11 @@ put_unused_fd(unsigned int fd) static inline void fd_install(unsigned int fd, struct linux_file *filp) { + cap_rights_t rights; struct file *file; - if (fget_unlocked(curthread->td_proc->p_fd, fd, NULL, &file, - NULL) != 0) { + if (fget_unlocked(curthread->td_proc->p_fd, fd, + cap_rights_init(&rights), &file, NULL) != 0) { file = NULL; } filp->_file = file; |