qemu-e2k/hw
Greg Kurz 56f101ecce 9pfs: handle walk of ".." in the root directory
The 9P spec at http://man.cat-v.org/plan_9/5/intro says:

All directories must support walks to the directory .. (dot-dot) meaning
parent directory, although by convention directories contain no explicit
entry for .. or . (dot).  The parent of the root directory of a server's
tree is itself.

This means that a client cannot walk further than the root directory
exported by the server. In other words, if the client wants to walk
"/.." or "/foo/../..", the server should answer like the request was
to walk "/".

This patch just does that:
- we cache the QID of the root directory at attach time
- during the walk we compare the QID of each path component with the root
  QID to detect if we're in a "/.." situation
- if so, we skip the current component and go to the next one

Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-08-30 19:23:00 +01:00
..
9pfs 9pfs: handle walk of ".." in the root directory 2016-08-30 19:23:00 +01:00
acpi trace-events: fix first line comment in trace-events 2016-08-12 10:36:01 +01:00
alpha trace-events: fix first line comment in trace-events 2016-08-12 10:36:01 +01:00
arm trace-events: fix first line comment in trace-events 2016-08-12 10:36:01 +01:00
audio trace-events: fix first line comment in trace-events 2016-08-12 10:36:01 +01:00
block trace-events: fix first line comment in trace-events 2016-08-12 10:36:01 +01:00
bt
char trace-events: fix first line comment in trace-events 2016-08-12 10:36:01 +01:00
core block/qdev: Let 'drive' property fall back to node name 2016-08-08 13:05:43 +02:00
cpu
cris
display trace-events: fix first line comment in trace-events 2016-08-12 10:36:01 +01:00
dma trace-events: fix first line comment in trace-events 2016-08-12 10:36:01 +01:00
gpio
i2c i2c: fix migration regression introduced by broadcast support 2016-08-03 18:44:56 +02:00
i386 trace-events: fix first line comment in trace-events 2016-08-12 10:36:01 +01:00
ide atapi: fix halted DMA reset 2016-08-09 11:47:23 -04:00
input trace-events: fix first line comment in trace-events 2016-08-12 10:36:01 +01:00
intc trace-events: fix first line comment in trace-events 2016-08-12 10:36:01 +01:00
ipack
ipmi
isa trace-events: fix first line comment in trace-events 2016-08-12 10:36:01 +01:00
lm32
m68k
mem nvdimm: fix memory leak in error code path 2016-07-20 19:30:26 +03:00
microblaze
mips error: Strip trailing '\n' from error string arguments (again) 2016-08-08 09:00:44 +02:00
misc trace-events: fix first line comment in trace-events 2016-08-12 10:36:01 +01:00
moxie
net e1000e: remove internal interrupt flag 2016-08-22 16:06:08 +08:00
nvram trace-events: fix first line comment in trace-events 2016-08-12 10:36:01 +01:00
openrisc
pci trace-events: fix first line comment in trace-events 2016-08-12 10:36:01 +01:00
pci-bridge hw/pci-bridge: Convert pxb initialization functions to Error 2016-07-29 00:07:09 +03:00
pci-host apb: convert init to realize 2016-07-29 00:07:09 +03:00
pcmcia
ppc ppc patch queue for 2016-08-15 2016-08-15 21:48:03 +01:00
s390x trace-events: fix first line comment in trace-events 2016-08-12 10:36:01 +01:00
scsi trace-events: fix first line comment in trace-events 2016-08-12 10:36:01 +01:00
sd trace-events: fix first line comment in trace-events 2016-08-12 10:36:01 +01:00
sh4
smbios
sparc trace-events: fix first line comment in trace-events 2016-08-12 10:36:01 +01:00
sparc64
ssi ast2400: pretend DMAs are done for U-boot 2016-07-14 16:51:38 +01:00
timer trace-events: fix first line comment in trace-events 2016-08-12 10:36:01 +01:00
tpm
tricore
unicore32
usb trace-events: fix first line comment in trace-events 2016-08-12 10:36:01 +01:00
vfio trace-events: fix first line comment in trace-events 2016-08-12 10:36:01 +01:00
virtio virtio: fixes 2016-08-24 17:21:03 +01:00
watchdog
xen Xen: fix converity warning of xen_pt_config_init() 2016-08-12 16:38:18 -07:00
xenpv xen: use a common function for pv and hvm guest backend register calls 2016-08-03 14:52:11 +02:00
xtensa
Makefile.objs