commit | 1817176a86352f65210139d4c794ad2d19fc6b63 | [log] [tgz] |
---|---|---|
author | Dan Rosenberg <dan.j.rosenberg@gmail.com> | Thu Jun 24 12:07:47 2010 +1000 |
committer | Dave Chinner <david@fromorbit.com> | Thu Jun 24 12:07:47 2010 +1000 |
tree | 59ccbcb634d87882fc899b0d21438c4bb86f8632 | |
parent | 7e27d6e778cd87b6f2415515d7127eba53fe5d02 [diff] |
xfs: prevent swapext from operating on write-only files This patch prevents user "foo" from using the SWAPEXT ioctl to swap a write-only file owned by user "bar" into a file owned by "foo" and subsequently reading it. It does so by checking that the file descriptors passed to the ioctl are also opened for reading. Signed-off-by: Dan Rosenberg <dan.j.rosenberg@gmail.com> Reviewed-by: Christoph Hellwig <hch@lst.de>