diff options
| author | Jan Kara <jack@suse.cz> | 2015-05-21 16:05:52 +0200 |
|---|---|---|
| committer | Luis Henriques <luis.henriques@canonical.com> | 2015-07-15 10:00:50 +0100 |
| commit | 57932240cfcc462561b4a3945e7f58bd621d528f (patch) | |
| tree | e087046e2a2c722befbf18873f3935d64ed19279 /kernel | |
| parent | 225dc88db91c50a8a9df6af4973fabc4941cf7d7 (diff) | |
fs: Fix S_NOSEC handling
commit 2426f3910069ed47c0cc58559a6d088af7920201 upstream.
file_remove_suid() could mistakenly set S_NOSEC inode bit when root was
modifying the file. As a result following writes to the file by ordinary
user would avoid clearing suid or sgid bits.
Fix the bug by checking actual mode bits before setting S_NOSEC.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions
