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

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

diff -u --recursive --new-file v2.1.99/linux/drivers/block/ataflop.c linux/drivers/block/ataflop.c
@@ -1631,7 +1631,7 @@
 			return -EFAULT;
 		return 0;
 	case BLKRASET:
-		if (!suser())
+		if (!capable(CAP_SYS_ADMIN))
 			return -EACCES;
 		if (param > 0xff)
 			return -EINVAL;
@@ -1641,7 +1641,7 @@
 		return put_user(read_ahead[MAJOR(inode->i_rdev)],
 				(int *) param);
 	case BLKFLSBUF:
-		if (!suser())
+		if (!capable(CAP_SYS_ADMIN))
 			return -EACCES;
 		fsync_dev(inode->i_rdev);
 		invalidate_buffers(inode->i_rdev);

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