patch-1.3.58 linux/fs/ext2/ioctl.c
Next file: linux/fs/ext2/super.c
Previous file: linux/fs/ext2/CHANGES
Back to the patch index
Back to the overall index
- Lines: 16
- Date:
Wed Jan 17 07:31:58 1996
- Orig file:
v1.3.57/linux/fs/ext2/ioctl.c
- Orig date:
Wed Mar 22 10:33:59 1995
diff -u --recursive --new-file v1.3.57/linux/fs/ext2/ioctl.c linux/fs/ext2/ioctl.c
@@ -33,12 +33,13 @@
case EXT2_IOC_SETFLAGS:
flags = get_fs_long ((long *) arg);
/*
- * Only the super-user can change the IMMUTABLE flag
+ * The IMMUTABLE flag can only be changed by the super user
+ * when the security level is zero.
*/
if ((flags & EXT2_IMMUTABLE_FL) ^
(inode->u.ext2_i.i_flags & EXT2_IMMUTABLE_FL)) {
/* This test looks nicer. Thanks to Pauline Middelink */
- if (!fsuser())
+ if (!fsuser() || securelevel > 0)
return -EPERM;
} else
if ((current->fsuid != inode->i_uid) && !fsuser())
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this