virtiofsd: Terminate capability list
authorDr. David Alan Gilbert <dgilbert@redhat.com>
Mon, 29 Jun 2020 11:54:18 +0000 (12:54 +0100)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Fri, 3 Jul 2020 15:23:05 +0000 (16:23 +0100)
commitb1288dfafbdfb64e86bf9cfa22fa0b399e44e198
tree2982b4428733070f62392f9afe795116a78ba995
parent6651620b92bc08cde07cb500e9a43dba7bd9b2b7
virtiofsd: Terminate capability list

capng_updatev is a varargs function that needs a -1 to terminate it,
but it was missing.

In practice what seems to have been happening is that it's added the
capabilities we asked for, then runs into junk on the stack, so if
we're unlucky it might be adding some more, but in reality it's
failing - but after adding the capabilities we asked for.

Fixes: a59feb483b8 ("virtiofsd: only retain file system capabilities")
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Message-Id: <20200629115420.98443-2-dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
tools/virtiofsd/passthrough_ll.c