|
@@ -210,6 +210,9 @@ int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs,
|
|
newattrs.ia_valid |= ATTR_FILE;
|
|
newattrs.ia_valid |= ATTR_FILE;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /* Remove suid/sgid on truncate too */
|
|
|
|
+ newattrs.ia_valid |= should_remove_suid(dentry);
|
|
|
|
+
|
|
mutex_lock(&dentry->d_inode->i_mutex);
|
|
mutex_lock(&dentry->d_inode->i_mutex);
|
|
err = notify_change(dentry, &newattrs);
|
|
err = notify_change(dentry, &newattrs);
|
|
mutex_unlock(&dentry->d_inode->i_mutex);
|
|
mutex_unlock(&dentry->d_inode->i_mutex);
|