patch-2.1.100 linux/fs/affs/namei.c

Next file: linux/fs/attr.c
Previous file: linux/drivers/sound/sscape.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.99/linux/fs/affs/namei.c linux/fs/affs/namei.c
@@ -245,7 +245,7 @@
 	if (S_ISDIR(inode->i_mode))
 		goto unlink_done;
 	if (current->fsuid != inode->i_uid &&
-	    current->fsuid != dir->i_uid && !fsuser())
+	    current->fsuid != dir->i_uid && !capable(CAP_FOWNER))
 		goto unlink_done;
 
 	if ((retval = affs_remove_header(bh,inode)) < 0)
@@ -363,7 +363,7 @@
 
 	retval = -EPERM;
         if (current->fsuid != inode->i_uid &&
-            current->fsuid != dir->i_uid && !fsuser())
+            current->fsuid != dir->i_uid && !capable(CAP_FOWNER))
 		goto rmdir_done;
 	if (inode->i_dev != dir->i_dev)
 		goto rmdir_done;

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