patch-2.0.34 linux/fs/devices.c
Next file: linux/fs/dquot.c
Previous file: linux/fs/buffer.c
Back to the patch index
Back to the overall index
- Lines: 11
- Date:
Wed Jun 3 15:17:49 1998
- Orig file:
v2.0.33/linux/fs/devices.c
- Orig date:
Sun May 12 21:36:19 1996
diff -u --recursive --new-file v2.0.33/linux/fs/devices.c linux/fs/devices.c
@@ -227,6 +227,10 @@
int blkdev_open(struct inode * inode, struct file * filp)
{
int ret = -ENODEV;
+
+ if (securelevel > 0 && (filp->f_mode & FMODE_WRITE))
+ return -EACCES; /* cevans */
+
filp->f_op = get_blkfops(MAJOR(inode->i_rdev));
if (filp->f_op != NULL){
ret = 0;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov