1. 23 7月, 2013 8 次提交
    • R
      bridge driver: use more general function names · 73cf5b96
      Roman Bogorodskiy 提交于
      Continue preparation for extracting platform-specific
      parts from bridge_driver: s/Iptables/Firewall/ for
      firewall related function names.
      73cf5b96
    • R
      Add virDBusMessage(Encode,Decode) stubs · ac26b2b0
      Roman Bogorodskiy 提交于
      Commit 834c9c94 introduced virDBusMessageEncode and
      virDBusMessageDecode functions, however corresponding stubs
      were not added to !WITH_DBUS section, therefore 'make check'
      started to fail when compiled w/out dbus support like that:
      
      Expected symbol virDBusMessageDecode is not in ELF library
      ac26b2b0
    • O
      qemu: Translate the volume type disk source before cgroup setting · b6c162d3
      Osier Yang 提交于
      The translation must be done before both of cgroup and security
      setting, otherwise since the disk source is not translated yet,
      it might be skipped on cgroup and security setting.
      b6c162d3
    • O
      conf: Ignore the volume type disk if its mode is "direct" · 98584358
      Osier Yang 提交于
      virDomainDiskDefForeachPath is not only used by the security
      setting helpers, also used by cgroup setting helpers, so this
      is to ignore the volume type disk with mode="direct" for cgroup
      setting.
      98584358
    • J
      qemu: Translate the iscsi pool/volume disk source · 1b4eaa61
      John Ferlan 提交于
      The difference with already supported pool types (dir, fs, block)
      is: there are two modes for iscsi pool (or network pools in future),
      one can specify it either to use the volume target path (the path
      showed up on host) with mode='host', or to use the remote URI qemu
      supports (e.g. file=iscsi://example.org:6000/iqn.1992-01.com.example/1)
      with mode='direct'.
      
      For 'host' mode, it copies the volume target path into disk->src. For
      'direct' mode, the corresponding info in the *one* pool source host def
      is copied to disk->hosts[0].
      1b4eaa61
    • J
      conf: Introduce virDomainDiskSourceIsBlockType · 1f49b05a
      John Ferlan 提交于
      Introduce a new helper to check if the disk source is of block type
      1f49b05a
    • J
      conf: Introduce new XML tag "mode" for disk source · c00b2f0d
      John Ferlan 提交于
      There are two ways to use a iSCSI LUN as disk source for qemu.
      
       * The LUN's path as it shows up on host, e.g.
         /dev/disk/by-path/ip-$ip:3260-iscsi-$iqn-fc18:iscsi.iscsi0-lun-1
      
       * The libiscsi URI from the storage pool source element host attribute, e.g.
         iscsi://demo.org:6000/iqn.1992-01.com.example/1
      
      For a "volume" type disk, if the specified "pool" is of iscsi
      type, we should support to use the LUN in either of above 2 ways.
      That's why to introduce a new XML tag "mode" for the disk source
      (libvirt should support iscsi pool with libiscsi, but it's another
      new feature, which should be done later).
      
      The "mode" can be either of "host" or "direct". Use "host" to indicate
      use of the LUN with the path as it shows up on host. Use "direct" to
      indicate to use it with the source pool host URI (future patches may support
      to use network type libvirt storage too, e.g. Ceph)
      c00b2f0d
    • J
      storage_iscsi: Reflect the default target port · 5c62d5ea
      John Ferlan 提交于
      Make sure default iSCSI target is 3260.
      5c62d5ea
  2. 22 7月, 2013 16 次提交
  3. 20 7月, 2013 2 次提交
  4. 19 7月, 2013 6 次提交
    • J
      d327ac53
    • J
      util: Non-existent string array does not contain any string · 09e9f281
      Jiri Denemark 提交于
      Make virStringArrayHasString return false when called on a non-existent
      string array.
      09e9f281
    • E
      security: fix deadlock with prefork · bfc183c1
      Eric Blake 提交于
      Attempts to start a domain with both SELinux and DAC security
      modules loaded will deadlock; latent problem introduced in commit
      fdb3bde3 and exposed in commit 29fe5d74.  Basically, when recursing
      into the security manager for other driver's prefork, we have to
      undo the asymmetric lock taken at the manager level.
      
      Reported by Jiri Denemark, with diagnosis help from Dan Berrange.
      
      * src/security/security_stack.c (virSecurityStackPreFork): Undo
      extra lock grabbed during recursion.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      bfc183c1
    • E
      maint: split long lines in Makefiles · d21d40bf
      Eric Blake 提交于
      Makefiles are another easy file to enforce line limits.
      
      Mostly straightforward; interesting tricks worth noting:
      src/Makefile.am: $(confdir) was already defined, use it in more places
      tests/Makefile.am: path_add and VG required some interesting compression
      
      * cfg.mk (sc_prohibit_long_lines): Add another test.
      * Makefile.am: Fix offenders.
      * daemon/Makefile.am: Likewise.
      * docs/Makefile.am: Likewise.
      * python/Makefile.am: Likewise.
      * src/Makefile.am: Likewise.
      * tests/Makefile.am: Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      d21d40bf
    • E
      security_dac: compute supplemental groups before fork · 29fe5d74
      Eric Blake 提交于
      Commit 75c12564 states that virGetGroupList must not be called
      between fork and exec, then commit ee777e99 promptly violated
      that for lxc's use of virSecurityManagerSetProcessLabel.  Hoist
      the supplemental group detection to the time that the security
      manager needs to fork.  Qemu is safe, as it uses
      virSecurityManagerSetChildProcessLabel which in turn uses
      virCommand to determine supplemental groups.
      
      This does not fix the fact that virSecurityManagerSetProcessLabel
      calls virSecurityDACParseIds calls parseIds which eventually
      calls getpwnam_r, which also violates fork/exec async-signal-safe
      safety rules, but so far no one has complained of hitting
      deadlock in that case.
      
      * src/security/security_dac.c (_virSecurityDACData): Track groups
      in private data.
      (virSecurityDACPreFork): New function, to set them.
      (virSecurityDACClose): Clean up new fields.
      (virSecurityDACGetIds): Alter signature.
      (virSecurityDACSetSecurityHostdevLabelHelper)
      (virSecurityDACSetChardevLabel, virSecurityDACSetProcessLabel)
      (virSecurityDACSetChildProcessLabel): Update callers.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      29fe5d74
    • E
      security: framework for driver PreFork handler · fdb3bde3
      Eric Blake 提交于
      A future patch wants the DAC security manager to be able to safely
      get the supplemental group list for a given uid, but at the time
      of a fork rather than during initialization so as to pick up on
      live changes to the system's group database.  This patch adds the
      framework, including the possibility of a pre-fork callback
      failing.
      
      For now, any driver that implements a prefork callback must be
      robust against the possibility of being part of a security stack
      where a later element in the chain fails prefork.  This means
      that drivers cannot do any action that requires a call to postfork
      for proper cleanup (no grabbing a mutex, for example).  If this
      is too prohibitive in the future, we would have to switch to a
      transactioning sequence, where each driver has (up to) 3 callbacks:
      PreForkPrepare, PreForkCommit, and PreForkAbort, to either clean
      up or commit changes made during prepare.
      
      * src/security/security_driver.h (virSecurityDriverPreFork): New
      callback.
      * src/security/security_manager.h (virSecurityManagerPreFork):
      Change signature.
      * src/security/security_manager.c (virSecurityManagerPreFork):
      Optionally call into driver, and allow returning failure.
      * src/security/security_stack.c (virSecurityDriverStack):
      Wrap the handler for the stack driver.
      * src/qemu/qemu_process.c (qemuProcessStart): Adjust caller.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      fdb3bde3
  5. 18 7月, 2013 8 次提交