• L
    Fix domain restore for files on root-squash NFS · a03121bc
    Laine Stump 提交于
    If qemudDomainRestore fails to open the domain save file, create a
    pipe, then fork a process that does setuid(qemu_user) and opens the
    file, then reads this file and stuffs it into the pipe. the parent
    libvirtd process will use the other end of the pipe as its fd, then
    reap the child process after it's done reading.
    
    This makes domain restore work on a root-squash NFS share that is only
    visible to the qemu user.
    
    * src/qemu/qemu_driver.c: add new qemudOpenAsUID() helper function,
      and use it in qemudDomainRestore() if reading as root directly failed.
    a03121bc
qemu_driver.c 275.7 KB