patch-2.1.100 linux/drivers/acorn/block/mfmhd.c

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

diff -u --recursive --new-file v2.1.99/linux/drivers/acorn/block/mfmhd.c linux/drivers/acorn/block/mfmhd.c
@@ -1206,14 +1206,14 @@
 		return 0;
 
 	case BLKFLSBUF:
-		if (!suser())
+		if (!capable(CAP_SYS_ADMIN))
 			return -EACCES;
 		fsync_dev(dev);
 		invalidate_buffers(dev);
 		return 0;
 
 	case BLKRASET:
-		if (!suser())
+		if (!capable(CAP_SYS_ADMIN))
 			return -EACCES;
 		if (arg > 0xff)
 			return -EINVAL;
@@ -1227,7 +1227,7 @@
 		return put_user (mfm[minor].nr_sects, (long *)arg);
 
 	case BLKFRASET:
-		if (!suser())
+		if (!capable(CAP_SYS_ADMIN))
 			return -EACCES;
 		max_readahead[major][minor] = arg;
 		return 0;
@@ -1239,7 +1239,7 @@
 		return put_user(max_sectors[major][minor], (long *) arg);
 
 	case BLKRRPART:
-		if (!suser())
+		if (!capable(CAP_SYS_ADMIN))
 			return -EACCES;
 		return mfm_reread_partitions(dev);
 

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