1. 16 10月, 2015 1 次提交
  2. 07 10月, 2015 1 次提交
  3. 06 10月, 2015 1 次提交
  4. 15 9月, 2015 4 次提交
  5. 30 8月, 2015 1 次提交
  6. 27 8月, 2015 1 次提交
    • M
      virt-aa-helper: Improve valid_path · 52970dec
      Michal Privoznik 提交于
      So, after some movement in virt-aa-helper, I've noticed the
      virt-aa-helper-test failing. I've ran gdb (it took me a while to
      realize how to do that) and this showed up immediately:
      
        Program received signal SIGSEGV, Segmentation fault.
        strlen () at ../sysdeps/x86_64/strlen.S:106
        106     ../sysdeps/x86_64/strlen.S: No such file or directory.
        (gdb) bt
        #0  strlen () at ../sysdeps/x86_64/strlen.S:106
        #1  0x0000555555561a13 in array_starts_with (str=0x5555557ce910 "/tmp/tmp.6nI2Fkv0KL/1.img", arr=0x7fffffffd160, size=-1540438016) at security/virt-aa-helper.c:525
        #2  0x0000555555561d49 in valid_path (path=0x5555557ce910 "/tmp/tmp.6nI2Fkv0KL/1.img", readonly=false) at security/virt-aa-helper.c:617
        #3  0x0000555555562506 in vah_add_path (buf=0x7fffffffd3e0, path=0x5555557cb910 "/tmp/tmp.6nI2Fkv0KL/1.img", perms=0x555555581585 "rw", recursive=false) at security/virt-aa-helper.c:823
        #4  0x0000555555562693 in vah_add_file (buf=0x7fffffffd3e0, path=0x5555557cb910 "/tmp/tmp.6nI2Fkv0KL/1.img", perms=0x555555581585 "rw") at security/virt-aa-helper.c:854
        #5  0x0000555555562918 in add_file_path (disk=0x5555557d4440, path=0x5555557cb910 "/tmp/tmp.6nI2Fkv0KL/1.img", depth=0, opaque=0x7fffffffd3e0) at security/virt-aa-helper.c:931
        #6  0x00007ffff78f18b1 in virDomainDiskDefForeachPath (disk=0x5555557d4440, ignoreOpenFailure=true, iter=0x5555555628a6 <add_file_path>, opaque=0x7fffffffd3e0) at conf/domain_conf.c:23286
        #7  0x0000555555562b5f in get_files (ctl=0x7fffffffd670) at security/virt-aa-helper.c:982
        #8  0x0000555555564100 in vahParseArgv (ctl=0x7fffffffd670, argc=5, argv=0x7fffffffd7e8) at security/virt-aa-helper.c:1277
        #9  0x00005555555643d6 in main (argc=5, argv=0x7fffffffd7e8) at security/virt-aa-helper.c:1332
      
      So I've taken look at valid_path() because it is obviously
      calling array_starts_with() with malformed @size. And here's the
      result: there are two variables to hold the size of three arrays
      and their value is recalculated before each call of
      array_starts_with(). What if we just use three variables,
      initialize them and do not touch them afterwards?
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      52970dec
  7. 26 8月, 2015 1 次提交
    • P
      virt-aa-helper: add NVRAM store file for read/write · 91fdcefa
      Peter Kieser 提交于
      This is a cryptographically signed message in MIME format.
      
      Some UEFI firmwares may want to use a non-volatile memory to store some
      variables.
      If AppArmor is enabled, and NVRAM store file is set currently
      virt-aa-helper does
      not add the NVRAM store file to the template. Add this file for
      read/write when
      this functionality is defined in domain XML.
      Signed-off-by: NPeter Kieser <peter@kieser.ca>
      91fdcefa
  8. 24 8月, 2015 10 次提交
  9. 10 7月, 2015 4 次提交
  10. 08 7月, 2015 1 次提交
  11. 02 7月, 2015 1 次提交
  12. 21 4月, 2015 2 次提交
  13. 14 4月, 2015 1 次提交
  14. 14 2月, 2015 1 次提交
  15. 13 2月, 2015 2 次提交
  16. 14 1月, 2015 1 次提交
    • D
      Give virDomainDef parser & formatter their own flags · 0ecd6851
      Daniel P. Berrange 提交于
      The virDomainDefParse* and virDomainDefFormat* methods both
      accept the VIR_DOMAIN_XML_* flags defined in the public API,
      along with a set of other VIR_DOMAIN_XML_INTERNAL_* flags
      defined in domain_conf.c.
      
      This is seriously confusing & error prone for a number of
      reasons:
      
       - VIR_DOMAIN_XML_SECURE, VIR_DOMAIN_XML_MIGRATABLE and
         VIR_DOMAIN_XML_UPDATE_CPU are only relevant for the
         formatting operation
       - Some of the VIR_DOMAIN_XML_INTERNAL_* flags only apply
         to parse or to format, but not both.
      
      This patch cleanly separates out the flags. There are two
      distint VIR_DOMAIN_DEF_PARSE_* and VIR_DOMAIN_DEF_FORMAT_*
      flags that are used by the corresponding methods. The
      VIR_DOMAIN_XML_* flags received via public API calls must
      be converted to the VIR_DOMAIN_DEF_FORMAT_* flags where
      needed.
      
      The various calls to virDomainDefParse which hardcoded the
      use of the VIR_DOMAIN_XML_INACTIVE flag change to use the
      VIR_DOMAIN_DEF_PARSE_INACTIVE flag.
      0ecd6851
  17. 11 12月, 2014 2 次提交
  18. 09 12月, 2014 1 次提交
    • J
      security: Manage SELinux labels on shared/readonly hostdev's · f36d9285
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1082521
      
      Support for shared hostdev's was added in a number of commits, initially
      starting with 'f2c1d9a8' and most recently commit id 'fd243fc4' to fix
      issues with the initial implementation.  Missed in all those changes was
      the need to mimic the virSELinux{Set|Restore}SecurityDiskLabel code to
      handle the "shared" (or shareable) and readonly options when Setting
      or Restoring the SELinux labels.
      
      This patch will adjust the virSecuritySELinuxSetSecuritySCSILabel to not
      use the virSecuritySELinuxSetSecurityHostdevLabelHelper in order to set
      the label. Rather follow what the Disk code does by setting the label
      differently based on whether shareable/readonly is set.  This patch will
      also modify the virSecuritySELinuxRestoreSecuritySCSILabel to follow
      the same logic as virSecuritySELinuxRestoreSecurityImageLabelInt and not
      restore the label if shared/readonly
      f36d9285
  19. 25 11月, 2014 3 次提交
  20. 15 11月, 2014 1 次提交