• Andrew Morton's avatar
    [PATCH] remove_suid() should return error code · c884a1a3
    Andrew Morton authored
    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.
    c884a1a3
file.c 47.3 KB