diff options
| author | Andrew Morton <akpm@osdl.org> | 2004-03-18 15:04:08 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-03-18 15:04:08 -0800 |
| commit | c884a1a3d78bc9a0bf56b11e6d84d7447d93bf00 (patch) | |
| tree | f9c1e7c09a9cfe65d39132eb4962d4a0a8131003 /include/linux | |
| parent | 705e71d4f784bcb731782856ded3b8254f1ad663 (diff) | |
[PATCH] remove_suid() should return error code
From: Nikita Danilov <Nikita@Namesys.COM>
remove_suid() ignores return value of notify_change()->i_op->setattr().
This mean, that even if file system fails to clear suid bit,
generic_file_aio_write_nolock() proceeds with write, which is unsafe.
Actually, even ext2's ->setattr() can fail, when trying to update ACL, for
example.
Attached patch modifies remove_suid() to return result of ->setattr(), and
updates in-tree callers.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/fs.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 9c609f4febbc..80c6fce145d8 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1297,7 +1297,7 @@ extern void __iget(struct inode * inode); extern void clear_inode(struct inode *); extern void destroy_inode(struct inode *); extern struct inode *new_inode(struct super_block *); -extern void remove_suid(struct dentry *); +extern int remove_suid(struct dentry *); extern void __insert_inode_hash(struct inode *, unsigned long hashval); extern void remove_inode_hash(struct inode *); |
