patch-2.1.75 linux/fs/minix/namei.c

Next file: linux/fs/namei.c
Previous file: linux/fs/filesystems.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.74/linux/fs/minix/namei.c linux/fs/minix/namei.c
@@ -414,9 +414,9 @@
 	retval = -EPERM;
 	inode = dentry->d_inode;
 
-        if ((dir->i_mode & S_ISVTX) && !fsuser() &&
+        if ((dir->i_mode & S_ISVTX) &&
             current->fsuid != inode->i_uid &&
-            current->fsuid != dir->i_uid)
+            current->fsuid != dir->i_uid && !fsuser())
 		goto end_rmdir;
 	if (inode->i_dev != dir->i_dev)
 		goto end_rmdir;
@@ -480,9 +480,9 @@
 		schedule();
 		goto repeat;
 	}
-	if ((dir->i_mode & S_ISVTX) && !fsuser() &&
+	if ((dir->i_mode & S_ISVTX) &&
 	    current->fsuid != inode->i_uid &&
-	    current->fsuid != dir->i_uid)
+	    current->fsuid != dir->i_uid && !fsuser())
 		goto end_unlink;
 	if (de->inode != inode->i_ino) {
 		retval = -ENOENT;

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