patch-2.4.27 linux-2.4.27/fs/attr.c

Next file: linux-2.4.27/fs/buffer.c
Previous file: linux-2.4.27/fs/affs/super.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.26/fs/attr.c linux-2.4.27/fs/attr.c
@@ -33,7 +33,8 @@
 
 	/* Make sure caller can chgrp. */
 	if ((ia_valid & ATTR_GID) &&
-	    (!in_group_p(attr->ia_gid) && attr->ia_gid != inode->i_gid) &&
+	    (current->fsuid != inode->i_uid ||
+	    (!in_group_p(attr->ia_gid) && attr->ia_gid != inode->i_gid)) &&
 	    !capable(CAP_CHOWN))
 		goto error;
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)