summaryrefslogtreecommitdiff
path: root/fsdev/virtfs-proxy-helper.c
AgeCommit message (Collapse)AuthorFilesLines
2014-02-26fsdev: Fix overrun after readlink() fills buffer completelyMarkus Armbruster1-1/+1
readlink() returns the number of bytes written to the buffer, and it doesn't write a terminating null byte. do_readlink() writes it itself. Overruns the buffer when readlink() filled it completely. Fix by reserving space for the null byte when calling readlink(), like we do elsewhere. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2013-05-12remove double semicolonsDong Xu Wang1-2/+2
Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-01-30virtfs-proxy-helper: Fix unchecked strdup() by conv. to g_strdup()Markus Armbruster1-2/+2
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2012-12-19misc: move include files to include/qemu/Paolo Bonzini1-2/+2
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-05virtfs-proxy-helper: use setresuid and setresgidPaolo Bonzini1-29/+64
The setfsuid and setfsgid system calls are obscure and they complicate the error checking (that glibc's warn_unused_result "feature" forces us to do). Switch to the standard setresuid and setresgid functions. Signed-off-by: Paolo Bonzini <pbonini@redhat.com Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2012-01-30fsdev: Fix parameter parsing for proxy helperM. Mohan Kumar1-2/+8
This fixes a crash when using sockfd with proxy FsDriver Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2012-01-13virtfs-proxy-helper: Add missing printf format attributeStefan Weil1-1/+1
Every function with printf like arguments must have it (see file HACKING), so add it. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-01-13virtfs-proxy-helper: Clean include filesStefan Weil1-13/+2
The common standard include files are already included via qemu-common.h, and for the socket related include files there is qemu_socket.h, so the code can be reduced by some lines. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-01-13virtfs-proxy-helper: Fix compilation on newer systemsStefan Weil1-1/+1
Include file attr/xattr.h is not available on "newer" systems (for example Fedora 12 or Debian Squeeze). See comments in qemu-xattr.h for more information. This file handles the system dependencies automatically. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-01-04hw/9pfs: Add support to use named socket for proxy FSM. Mohan Kumar1-3/+83
Add option to use named socket for communicating between proxy helper and qemu proxy FS. Access to socket can be given by using command line options -u and -g. Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2012-01-04hw/9pfs: Proxy getversionM. Mohan Kumar1-0/+86
Add proxy getversion to get generation number Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2012-01-04hw/9pfs: xattr interfaces in proxy filesystem driverM. Mohan Kumar1-0/+99
Add xattr support for proxy FS Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2012-01-04hw/9pfs: File ownership and othersM. Mohan Kumar1-0/+83
Add file ownership interfaces like chmod/chown, utime update, rename, remove and truncating files for proxy FS Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2012-01-04hw/9pfs: Add stat/readlink/statfs for proxy FSM. Mohan Kumar1-0/+182
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2012-01-04hw/9pfs: Create other filesystem objectsM. Mohan Kumar1-6/+123
Add interfaces to create filesystem objects like directory, device nodes, symbolic links, links for proxy filesytem driver Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2012-01-04hw/9pfs: Open and create filesM. Mohan Kumar1-3/+176
Add interfaces to open and create files for proxy file system driver. Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2012-01-04hw/9pfs: File system helper process for qemu 9p proxy FSM. Mohan Kumar1-0/+300
Provide root privilege access to QEMU 9p proxy filesystem using socket communication. Proxy helper is started by root user as: ~ # virtfs-proxy-helper -f|--fd <socket descriptor> -p|--path <path-to-share> Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>