patch-2.1.100 linux/drivers/ap1000/ddv.c

Next file: linux/drivers/block/acsi.c
Previous file: linux/drivers/acorn/block/mfmhd.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.99/linux/drivers/ap1000/ddv.c linux/drivers/ap1000/ddv.c
@@ -856,6 +856,8 @@
 
 	case BLKRRPART:
 		printk("\tBLKRRPART\n");
+		if (!capable(CAP_SYS_ADMIN))
+			return -EACCES;
 		return ddv_revalidate(inode->i_rdev,&ddv_gendisk);
 
 	case BLKGETSIZE:   /* Return device size */

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