Skip to content
Commit 1817176a authored by Dan Rosenberg's avatar Dan Rosenberg Committed by Dave Chinner
Browse files

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: default avatarDan Rosenberg <dan.j.rosenberg@gmail.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
parent 7e27d6e7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment