patch-2.1.100 linux/drivers/block/acsi.c

Next file: linux/drivers/block/ali14xx.c
Previous file: linux/drivers/ap1000/ddv.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.99/linux/drivers/block/acsi.c linux/drivers/block/acsi.c
@@ -1149,13 +1149,15 @@
 				(long *) arg);
 		
 	  case BLKFLSBUF:
-		if(!suser())  return -EACCES;
+		if(!capable(CAP_SYS_ADMIN))  return -EACCES;
 		if(!inode->i_rdev) return -EINVAL;
 		fsync_dev(inode->i_rdev);
 		invalidate_buffers(inode->i_rdev);
 		return 0;
 
 	  case BLKRRPART: /* Re-read partition tables */
+	        if (!capable(CAP_SYS_ADMIN)) 
+			return -EACCES;
 		return revalidate_acsidisk(inode->i_rdev, 1);
 	  RO_IOCTLS(inode->i_rdev,arg);
 	  default:

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