patch-2.1.100 linux/drivers/char/bttv.c

Next file: linux/drivers/char/console.c
Previous file: linux/drivers/char/apm_bios.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.99/linux/drivers/char/bttv.c linux/drivers/char/bttv.c
@@ -1581,7 +1581,7 @@
 		case VIDIOCSFBUF:
 		{
 			struct video_buffer v;
-			if(!suser())
+			if(!capable(CAP_SYS_ADMIN))
 				return -EPERM;
 			if(copy_from_user(&v, arg,sizeof(v)))
 				return -EFAULT;
@@ -1680,7 +1680,7 @@
 		        return 0;
 
 		case BTTV_WRITEE:
-			if(!suser())
+			if(!capable(CAP_SYS_ADMIN))
 				return -EPERM;
 			if(copy_from_user((void *) eedata, (void *) arg, 256))
 				return -EFAULT;
@@ -1688,7 +1688,7 @@
 			return 0;
 
 		case BTTV_READEE:
-			if(!suser())
+			if(!capable(CAP_SYS_ADMIN))
 				return -EPERM;
 			readee(&(btv->i2c), eedata);
 			if(copy_to_user((void *) arg, (void *) eedata, 256))

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov