# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/07/03 18:32:40-03:00 marcelo@logos.cnet 
#     Thomas Biege: Fix missing DAC check on sys_chown
# 
# fs/attr.c
#   2004/07/03 18:28:30-03:00 marcelo@logos.cnet +1 -0
#   Thomas Biege: Fix missing DAC check on sys_chown
# 
diff -Nru a/fs/attr.c b/fs/attr.c
--- a/fs/attr.c	2004-07-05 01:13:32 -07:00
+++ b/fs/attr.c	2004-07-05 01:13:32 -07:00
@@ -33,6 +33,7 @@
 
 	/* Make sure caller can chgrp. */
 	if ((ia_valid & ATTR_GID) &&
+	    (current->fsuid != inode->i_uid ||
 	    (!in_group_p(attr->ia_gid) && attr->ia_gid != inode->i_gid) &&
 	    !capable(CAP_CHOWN))
 		goto error;
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/07/03 19:29:45-03:00 marcelo@logos.cnet 
#     Add missing bracket to inode_change_ok() fix
#   TAG: v2.4.27-rc3
# 
# fs/attr.c
#   2004/07/03 19:28:29-03:00 marcelo@logos.cnet +1 -1
#   Add missing bracket to inode_change_ok() fix
# 
diff -Nru a/fs/attr.c b/fs/attr.c
--- a/fs/attr.c	2004-07-05 01:13:35 -07:00
+++ b/fs/attr.c	2004-07-05 01:13:35 -07:00
@@ -34,7 +34,7 @@
 	/* Make sure caller can chgrp. */
 	if ((ia_valid & ATTR_GID) &&
 	    (current->fsuid != inode->i_uid ||
-	    (!in_group_p(attr->ia_gid) && attr->ia_gid != inode->i_gid) &&
+	    (!in_group_p(attr->ia_gid) && attr->ia_gid != inode->i_gid)) &&
 	    !capable(CAP_CHOWN))
 		goto error;
 
