aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/amr
diff options
context:
space:
mode:
authorPawel Jakub Dawidek <pjd@FreeBSD.org>2013-09-05 00:09:56 +0000
committerPawel Jakub Dawidek <pjd@FreeBSD.org>2013-09-05 00:09:56 +0000
commit7008be5bd7341259037f383434a72960413cfeb8 (patch)
treeecf189da5929e9d96594e07f21c25b003ec96d1d /sys/dev/amr
parentc70fe93ad8574e7b8add232fb3890349ab11cc1a (diff)
Notes
Diffstat (limited to 'sys/dev/amr')
-rw-r--r--sys/dev/amr/amr_linux.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/amr/amr_linux.c b/sys/dev/amr/amr_linux.c
index 44e858ba804e..5b1a17f530b1 100644
--- a/sys/dev/amr/amr_linux.c
+++ b/sys/dev/amr/amr_linux.c
@@ -72,10 +72,12 @@ MODULE_DEPEND(amr, linux, 1, 1, 1);
static int
amr_linux_ioctl(struct thread *p, struct linux_ioctl_args *args)
{
+ cap_rights_t rights;
struct file *fp;
int error;
- if ((error = fget(p, args->fd, CAP_IOCTL, &fp)) != 0)
+ error = fget(p, args->fd, cap_rights_init(&rights, CAP_IOCTL), &fp);
+ if (error != 0)
return (error);
error = fo_ioctl(fp, args->cmd, (caddr_t)args->arg, p->td_ucred, p);
fdrop(fp, p);