projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
asus-laptop: notify ALL events
[firefly-linux-kernel-4.4.55.git]
/
fs
/
open.c
diff --git
a/fs/open.c
b/fs/open.c
index ca9981c4a658247bb6e29aaaaad8fa88f4d99dd8..0d515d1619747b00e724471a407f2a6cf6ea51d7 100644
(file)
--- a/
fs/open.c
+++ b/
fs/open.c
@@
-210,6
+210,9
@@
int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs,
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);
err = notify_change(dentry, &newattrs);
mutex_unlock(&dentry->d_inode->i_mutex);