From 8fb91b33c6bfa3ac5e4ad76920b7bcd7bdbbb6d0 Mon Sep 17 00:00:00 2001 From: Martin Rubli Date: Wed, 8 Sep 2010 04:15:23 -0300 Subject: [media] uvcvideo: Remove sysadmin requirements for UVCIOC_CTRL_MAP This patch removes the sysadmin requirements for UVCIOC_CTRL_MAP (and the stub implementation of UVCIOC_CTRL_ADD). This requirement no longer makes sense with the new XU control access mechanisms since XU controls can be accessed without adding control mappings first. A maximum number (currently 1024) of control mappings per device is enforced to avoid excess memory consumption caused by careless user space applications. Signed-off-by: Martin Rubli Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/uvc/uvc_v4l2.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'drivers/media/video/uvc/uvc_v4l2.c') diff --git a/drivers/media/video/uvc/uvc_v4l2.c b/drivers/media/video/uvc/uvc_v4l2.c index 4a51048..6d15de9 100644 --- a/drivers/media/video/uvc/uvc_v4l2.c +++ b/drivers/media/video/uvc/uvc_v4l2.c @@ -1025,16 +1025,10 @@ static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg) /* Dynamic controls. */ case UVCIOC_CTRL_ADD: /* Legacy ioctl, kept for API compatibility reasons */ - if (!capable(CAP_SYS_ADMIN)) - return -EPERM; - return -EEXIST; case UVCIOC_CTRL_MAP_OLD: case UVCIOC_CTRL_MAP: - if (!capable(CAP_SYS_ADMIN)) - return -EPERM; - return uvc_ioctl_ctrl_map(chain, arg, cmd == UVCIOC_CTRL_MAP_OLD); -- cgit v1.1