virtiofsd: prevent ".." escape in lo_do_readdir()
commit752272da2b68a2312f0e11fc5303015a6c3ee1ac
authorStefan Hajnoczi <stefanha@redhat.com>
Tue, 5 Mar 2019 09:32:49 +0000 (5 09:32 +0000)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Thu, 23 Jan 2020 16:41:36 +0000 (23 16:41 +0000)
tree9ce46e3e49987b7c2e8c4e87d60530377d38f869
parent854684bc0b3d63eb90b3abdfe471c2e4271ef176
virtiofsd: prevent ".." escape in lo_do_readdir()

Construct a fake dirent for the root directory's ".." entry.  This hides
the parent directory from the FUSE client.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Sergio Lopez <slp@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
tools/virtiofsd/passthrough_ll.c