mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-23 19:49:43 +00:00
3b5ee9e86b
The QID path should uniquely identify a file. However, the inode of a file is currently used as the QID path, which on its own only uniquely identifies files within a device. Here we track the device hosting the 9pfs share, in order to prevent security issues with QID path collisions from other devices. We only print a warning for now but a subsequent patch will allow users to have finer control over the desired behaviour. Failing the I/O will be one the proposed behaviour, so we also change stat_to_qid() to return an error here in order to keep other patches simpler. Signed-off-by: Antonios Motakis <antonios.motakis@huawei.com> [CS: - Assign dev_id to export root's device already in v9fs_device_realize_common(), not postponed in stat_to_qid(). - error_report_once() if more than one device was shared by export. - Return -ENODEV instead of -ENOSYS in stat_to_qid(). - Fixed typo in log comment. ] Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com> [groug, changed to warning, updated message and changelog] Signed-off-by: Greg Kurz <groug@kaod.org> |
||
---|---|---|
.. | ||
9p-local.c | ||
9p-local.h | ||
9p-posix-acl.c | ||
9p-proxy.c | ||
9p-proxy.h | ||
9p-synth.c | ||
9p-synth.h | ||
9p-util.c | ||
9p-util.h | ||
9p-xattr-user.c | ||
9p-xattr.c | ||
9p-xattr.h | ||
9p.c | ||
9p.h | ||
codir.c | ||
cofile.c | ||
cofs.c | ||
coth.c | ||
coth.h | ||
coxattr.c | ||
Kconfig | ||
Makefile.objs | ||
trace-events | ||
virtio-9p-device.c | ||
virtio-9p.h | ||
xen-9p-backend.c | ||
xen-9pfs.h |