diff options
-rw-r--r-- | fs/open.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -210,6 +210,9 @@ int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs, | |||
210 | newattrs.ia_valid |= ATTR_FILE; | 210 | newattrs.ia_valid |= ATTR_FILE; |
211 | } | 211 | } |
212 | 212 | ||
213 | /* Remove suid/sgid on truncate too */ | ||
214 | newattrs.ia_valid |= should_remove_suid(dentry); | ||
215 | |||
213 | mutex_lock(&dentry->d_inode->i_mutex); | 216 | mutex_lock(&dentry->d_inode->i_mutex); |
214 | err = notify_change(dentry, &newattrs); | 217 | err = notify_change(dentry, &newattrs); |
215 | mutex_unlock(&dentry->d_inode->i_mutex); | 218 | mutex_unlock(&dentry->d_inode->i_mutex); |