1. 06 6月, 2018 2 次提交
    • S
      security: Label the external swtpm with SELinux labels · 2fc665bb
      Stefan Berger 提交于
      In this patch we label the swtpm process with SELinux labels. We give it the
      same label as the QEMU process has. We label its state directory and files
      as well. We restore the old security labels once the swtpm has terminated.
      
      The file and process labels now look as follows:
      
      Directory: /var/lib/libvirt/swtpm
      
      [root@localhost swtpm]# ls -lZ
      total 4
      rwx------. 2 tss  tss  system_u:object_r:svirt_image_t:s0:c254,c932 4096 Apr  5 16:46 testvm
      
      [root@localhost testvm]# ls -lZ
      total 8
      -rw-r--r--. 1 tss tss system_u:object_r:svirt_image_t:s0:c254,c932 3648 Apr  5 16:46 tpm-00.permall
      
      The log in /var/log/swtpm/libvirt/qemu is labeled as follows:
      
      -rw-r--r--. 1 tss tss system_u:object_r:svirt_image_t:s0:c254,c932 2237 Apr  5 16:46 vtpm.log
      
      [root@localhost 485d0004-a48f-436a-8457-8a3b73e28567]# ps auxZ | grep swtpm | grep ctrl | grep -v grep
      system_u:system_r:svirt_t:s0:c254,c932 tss 25664 0.0  0.0 28172  3892 ?        Ss   16:57   0:00 /usr/bin/swtpm socket --daemon --ctrl type=unixio,path=/var/run/libvirt/qemu/swtpm/testvm-swtpm.sock,mode=0660 --tpmstate dir=/var/lib/libvirt/swtpm/testvm/tpm1.2 --log file=/var/log/swtpm/libvirt/qemu/testvm-swtpm.log
      
      [root@localhost 485d0004-a48f-436a-8457-8a3b73e28567]# ps auxZ | grep qemu | grep tpm | grep -v grep
      system_u:system_r:svirt_t:s0:c254,c932 qemu 25669 99.0  0.0 3096704 48500 ?    Sl   16:57   3:28 /bin/qemu-system-x86_64 [..]
      Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      2fc665bb
    • S
      util: Implement virFileChownFiles() · eb46575a
      Stefan Berger 提交于
      Implement virFileChownFiles() which changes file ownership of all
      files in a given directory.
      Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      eb46575a
  2. 05 6月, 2018 9 次提交
  3. 29 5月, 2018 2 次提交
  4. 28 5月, 2018 1 次提交
  5. 23 5月, 2018 1 次提交
  6. 16 5月, 2018 3 次提交
  7. 15 5月, 2018 1 次提交
  8. 14 5月, 2018 2 次提交
  9. 11 5月, 2018 3 次提交
  10. 07 5月, 2018 1 次提交
  11. 04 5月, 2018 3 次提交
  12. 03 5月, 2018 1 次提交
  13. 23 4月, 2018 2 次提交
  14. 18 4月, 2018 1 次提交
  15. 17 4月, 2018 1 次提交
  16. 10 4月, 2018 1 次提交
  17. 06 4月, 2018 1 次提交
    • J
      util: introduce virSocketAddrParseAny · 412afdb8
      Jim Fehlig 提交于
      When preparing for migration, the libxl driver creates a new TCP listen
      socket for the incoming migration by calling virNetSocketNewListenTCP,
      passing the destination host name. virNetSocketNewListenTCP calls
      virSocketAddrParse to check if the host name is a wildcard address, in
      which case it avoids adding the AI_ADDRCONFIG flag to the hints passed to
      getaddrinfo. If the host name is not an IP address, virSocketAddrParse
      reports an error
      
      error : virSocketAddrParseInternal:121 : Cannot parse socket address
      'myhost.example.com': Name or service not known
      
      But virNetSocketNewListenTCP succeeds regardless and the overall migration
      operation succeeds.
      
      Introduce virSocketAddrParseAny and use it when simply testing if a host
      name/addr is parsable.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      412afdb8
  18. 05 4月, 2018 1 次提交
  19. 03 4月, 2018 3 次提交
  20. 23 3月, 2018 1 次提交