From de5c676a83da5df7223d7c7f69a509d400f5aba4 Mon Sep 17 00:00:00 2001 From: Mark Huang Date: Tue, 30 Nov 2004 16:44:31 +0000 Subject: [PATCH] - merge revision 1.8 date: 2004/11/23 15:07:34; author: mlhuang; state: Exp; lines: +4 -4 - apply ioctl() patch to make sure that only superuser or someone capable of setting the immutable bit, can set the immulink bit From: Sam Vilain Re: [Vserver] [PATCH] immulink ioctl is not available on vs1.9.3-rc2, even with CONFIG_VSERVER_LEGACY To: vserver@list.linux-vserver.org Date: 10/19/04 12:17 am Here's the missing link. --- fs/ext3/ioctl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/ext3/ioctl.c b/fs/ext3/ioctl.c index 37bd4509d..f58d49736 100644 --- a/fs/ext3/ioctl.c +++ b/fs/ext3/ioctl.c @@ -59,11 +59,11 @@ int ext3_ioctl (struct inode * inode, struct file * filp, unsigned int cmd, * * This test looks nicer. Thanks to Pauline Middelink */ - if ((oldflags & EXT3_IMMUTABLE_FL) || + if (((oldflags & EXT3_IMMUTABLE_FL) || ((flags ^ oldflags) & - (EXT3_APPEND_FL | EXT3_IMMUTABLE_FL))) { - if (!capable(CAP_LINUX_IMMUTABLE)) - return -EPERM; + (EXT3_APPEND_FL | EXT3_IMMUTABLE_FL | EXT3_IUNLINK_FL))) + && !capable(CAP_LINUX_IMMUTABLE)) { + return -EPERM; } /* -- 2.47.0