1. 01 7月, 2016 1 次提交
  2. 17 6月, 2015 1 次提交
    • E
      lxc: set nosuid+nodev+noexec flags on /proc/sys mount · bda5f2bd
      Eric W. Biederman 提交于
      Future kernels will mandate the use of nosuid+nodev+noexec
      flags when mounting the /proc/sys filesystem. Unconditionally
      add them now since they don't harm things regardless and could
      mitigate future security attacks.
      
      (cherry picked from commit 24710414)
      
      Conflicts:
          src/lxc/lxc_container.c
      bda5f2bd
  3. 16 11月, 2014 1 次提交
  4. 04 9月, 2014 2 次提交
  5. 23 7月, 2014 4 次提交
    • J
      Introduce virTristateSwitch enum · 3227e17d
      Ján Tomko 提交于
      For the values "default", "on", "off"
      
      Replaces
      virDeviceAddressPCIMulti
      virDomainFeatureState
      virDomainIoEventFd
      virDomainVirtioEventIdx
      virDomainDiskCopyOnRead
      virDomainMemDump
      virDomainPCIRombarMode
      virDomainGraphicsSpicePlaybackCompression
      3227e17d
    • P
      Fix build after 47e5b5ae · 0e6cacc4
      Peter Krempa 提交于
      The patch described above introduced two problems caught by the compiler
      and thus breaking the build.
      
      One of the problems was comparison of unsigned with < 0 and the second
      one jumped a variable init.
      0e6cacc4
    • C
      lxc: allow to keep or drop capabilities · 47e5b5ae
      Cédric Bosdonnat 提交于
      Added <capabilities> in the <features> section of LXC domains
      configuration. This section can contain elements named after the
      capabilities like:
      
        <mknod state="on"/>, keep CAP_MKNOD capability
        <sys_chroot state="off"/> drop CAP_SYS_CHROOT capability
      
      Users can restrict or give more capabilities than the default using
      this mechanism.
      47e5b5ae
    • C
      LXC: create a bind mount for sysfs when enable userns but disable netns · a86b6215
      Chen Hanxiao 提交于
      kernel commit 7dc5dbc879bd0779924b5132a48b731a0bc04a1e
      forbid us doing a fresh mount for sysfs
      when enable userns but disable netns.
      This patch will create a bind mount in this senario.
      Signed-off-by: NChen Hanxiao <chenhanxiao@cn.fujitsu.com>
      a86b6215
  6. 18 7月, 2014 1 次提交
  7. 03 7月, 2014 1 次提交
  8. 25 3月, 2014 1 次提交
  9. 18 3月, 2014 1 次提交
  10. 10 3月, 2014 1 次提交
  11. 04 3月, 2014 1 次提交
    • E
      util: make it easier to grab only regular process exit · c72e76c3
      Eric Blake 提交于
      Right now, a caller waiting for a child process either requires
      the child to have status 0, or must use WIFEXITED() and friends
      itself.  But in many cases, we want the middle ground of treating
      fatal signals as an error, and directly accessing the normal exit
      value without having to use WEXITSTATUS(), in order to easily
      detect an expected non-zero exit status.  This adds the middle
      ground to the low-level virProcessWait; the next patch will add
      it to virCommand.
      
      * src/util/virprocess.h (virProcessWait): Alter signature.
      * src/util/virprocess.c (virProcessWait): Add parameter.
      (virProcessRunInMountNamespace): Adjust caller.
      * src/util/vircommand.c (virCommandWait): Likewise.
      * src/util/virfile.c (virFileAccessibleAs): Likewise.
      * src/lxc/lxc_container.c (lxcContainerHasReboot)
      (lxcContainerAvailable): Likewise.
      * daemon/libvirtd.c (daemonForkIntoBackground): Likewise.
      * tools/virt-login-shell.c (main): Likewise.
      * tools/virsh-domain.c (cmdLxcEnterNamespace): Likewise.
      * tests/testutils.c (virtTestCaptureProgramOutput): Likewise.
      * tests/commandtest.c (test23): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      c72e76c3
  12. 20 2月, 2014 1 次提交
  13. 13 2月, 2014 1 次提交
  14. 18 12月, 2013 1 次提交
  15. 16 12月, 2013 1 次提交
  16. 11 12月, 2013 1 次提交
  17. 06 12月, 2013 1 次提交
  18. 29 11月, 2013 1 次提交
  19. 28 11月, 2013 2 次提交
  20. 26 11月, 2013 2 次提交
    • G
      LXC: don't unmount mounts for shared root · f575fda7
      Gao feng 提交于
      Also after commit 5ff9d8a65ce80efb509ce4e8051394e9ed2cd942
      vfs: Lock in place mounts from more privileged users,
      
      unprivileged user has no rights to umount the mounts that
      inherited from parent mountns.
      
      right now, I have no good idea to fix this problem, we need
      to do more research. this patch just skip unmounting these
      mounts for shared root.
      
      BTW, I think when libvirt lxc enables user namespace, the
      configuation that shares root with host is very rara.
      Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
      f575fda7
    • G
      LXC: fix the problem that libvirt lxc fail to start on latest kernel · 46f2d16f
      Gao feng 提交于
      After kernel commit 5ff9d8a65ce80efb509ce4e8051394e9ed2cd942
      vfs: Lock in place mounts from more privileged users,
      
      unprivileged user has no rights to move the mounts that
      inherited from parent mountns. we use this feature to move
      the /stateDir/domain-name.{dev, devpts} to the /dev/ and
      /dev/pts directroy of container. this commit breaks libvirt lxc.
      
      this patch changes the behavior to bind these mounts when
      user namespace is enabled and move these mounts when user
      namespace is disabled.
      Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
      46f2d16f
  21. 25 11月, 2013 1 次提交
  22. 21 11月, 2013 1 次提交
    • E
      maint: fix comma style issues: remaining drivers · 64b2335c
      Eric Blake 提交于
      Most of our code base uses space after comma but not before;
      fix the remaining uses before adding a syntax check.
      
      * src/lxc/lxc_container.c: Consistently use commas.
      * src/openvz/openvz_driver.c: Likewise.
      * src/openvz/openvz_util.c: Likewise.
      * src/remote/remote_driver.c: Likewise.
      * src/test/test_driver.c: Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      64b2335c
  23. 08 11月, 2013 1 次提交
    • P
      conf: Refactor storing and usage of feature flags · de7b5faf
      Peter Krempa 提交于
      Currently we were storing domain feature flags in a bit field as the
      they were either enabled or disabled. New features such as paravirtual
      spinlocks however can be tri-state as the default option may depend on
      hypervisor version.
      
      To allow storing tri-state feature state in the same place instead of
      having to declare dedicated variables for each feature this patch
      refactors the bit field to an array.
      de7b5faf
  24. 05 11月, 2013 5 次提交
  25. 29 10月, 2013 1 次提交
  26. 28 10月, 2013 1 次提交
  27. 14 10月, 2013 2 次提交
  28. 09 10月, 2013 1 次提交
    • J
      LXC: Fix handling of RAM filesystem size units · 3f029fb5
      Ján Tomko 提交于
      Since 76b644c3 when the support for RAM filesystems was introduced,
      libvirt accepted the following XML:
      <source usage='1024' unit='KiB'/>
      
      This was parsed correctly and internally stored in bytes, but it
      was formatted as (with an extra 's'):
      <source usage='1024' units='KiB'/>
      When read again, this was treated as if the units were missing,
      meaning libvirt was unable to parse its own XML correctly.
      
      The usage attribute was documented as being in KiB, but it was not
      scaled if the unit was missing. Transient domains still worked,
      because this was balanced by an extra 'k' in the mount options.
      
      This patch:
      Changes the parser to use 'units' instead of 'unit', as the latter
      was never documented (fixing persistent domains) and some programs
      (libvirt-glib, libvirt-sandbox) already parse the 'units' attribute.
      
      Removes the extra 'k' from the tmpfs mount options, which is needed
      because now we parse our own XML correctly.
      
      Changes the default input unit to KiB to match documentation, fixing:
      https://bugzilla.redhat.com/show_bug.cgi?id=1015689
      3f029fb5
  29. 01 10月, 2013 1 次提交