virtiofsd: passthrough_ll: add fd_map to hide file descriptors
commit73b4d19dfc4248a74c1f3e511cfa934681d9c602
authorStefan Hajnoczi <stefanha@redhat.com>
Thu, 31 Jan 2019 06:02:40 +0000 (31 14:02 +0800)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Thu, 23 Jan 2020 16:41:36 +0000 (23 16:41 +0000)
tree51e98cade32de1ed33df245b978e7bf65a083469
parentb39bce121bfad8757eec0ee41f14607b883935d3
virtiofsd: passthrough_ll: add fd_map to hide file descriptors

Do not expose file descriptor numbers to clients.  This prevents the
abuse of internal file descriptors (like stdin/stdout).

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Fix from:
Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
dgilbert:
  Added lseek
Reviewed-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
tools/virtiofsd/passthrough_ll.c