diff -ruN 05-nfsroot/fs/attr.c 06-setattr/fs/attr.c
--- 05-nfsroot/fs/attr.c Mon Nov 4 17:30:07 2002
+++ 06-setattr/fs/attr.c Thu Nov 7 17:31:37 2002
@@ -134,6 +134,7 @@
if (!(ia_valid & ATTR_MTIME_SET))
attr->ia_mtime = now;
if (ia_valid & ATTR_KILL_SUID) {
+ attr->ia_valid &= ~ATTR_KILL_SUID;
if (mode & S_ISUID) {
if (!(ia_valid & ATTR_MODE)) {
ia_valid = attr->ia_valid |= ATTR_MODE;
@@ -143,6 +144,7 @@
}
}
if (ia_valid & ATTR_KILL_SGID) {
+ attr->ia_valid &= ~ ATTR_KILL_SGID;
if ((mode & (S_ISGID | S_IXGRP)) == (S_ISGID | S_IXGRP)) {
if (!(ia_valid & ATTR_MODE)) {
ia_valid = attr->ia_valid |= ATTR_MODE;
@@ -151,6 +153,8 @@
attr->ia_mode &= ~S_ISGID;
}
}
+ if (!attr->ia_valid)
+ return 0;
if (inode->i_op && inode->i_op->setattr) {
error = security_ops->inode_setattr(dentry, attr);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/