Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 232189
b: refs/heads/master
c: a1198cc
h: refs/heads/master
i:
  232187: 35c9ab6
v: v3
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Jan 19, 2011
1 parent db02c59 commit 13bc713
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4c775902252b06673cf26a33834842f1fec3fe3e
refs/heads/master: a1198ccf9c52922e66a3372b0045ebe335a127dd
20 changes: 12 additions & 8 deletions trunk/drivers/media/video/v4l2-ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1659,20 +1659,24 @@ static long __video_do_ioctl(struct file *file,
{
struct v4l2_dbg_register *p = arg;

if (!capable(CAP_SYS_ADMIN))
ret = -EPERM;
else if (ops->vidioc_g_register)
ret = ops->vidioc_g_register(file, fh, p);
if (ops->vidioc_g_register) {
if (!capable(CAP_SYS_ADMIN))
ret = -EPERM;
else
ret = ops->vidioc_g_register(file, fh, p);
}
break;
}
case VIDIOC_DBG_S_REGISTER:
{
struct v4l2_dbg_register *p = arg;

if (!capable(CAP_SYS_ADMIN))
ret = -EPERM;
else if (ops->vidioc_s_register)
ret = ops->vidioc_s_register(file, fh, p);
if (ops->vidioc_s_register) {
if (!capable(CAP_SYS_ADMIN))
ret = -EPERM;
else
ret = ops->vidioc_s_register(file, fh, p);
}
break;
}
#endif
Expand Down

0 comments on commit 13bc713

Please sign in to comment.