1. 27 Nov, 2013 9 commits
  2. 26 Nov, 2013 3 commits
  3. 25 Nov, 2013 18 commits
  4. 22 Nov, 2013 6 commits
  5. 21 Nov, 2013 3 commits
    • Support files for systemd on Fedora. · 87ff951e
      Michael H. Warfield authored
      Added a file "lxc.service" for a systemd service file.
      
      Added a file "lxc-devsetup" to setup /dev/ on startup to support autodev
      in containers.
      
      Service file references lxc-devsetup as an ExecStartPre command.  The
      lxc-devsetup script is not dependent on systemd or Fedora and can
      be used at bootup on any system.
      
      Modified lxc.spec.in to install the two new files on Fedora.  The systemd
      specific code in the lxc.spec file may need some review and conditionalize
      for systemd on non-systemd rpm-based systems.
      Signed-off-by: 's avatarMichael H. Warfield <mhw@WittsEnd.com>
      Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
    • lxcapi_clone: set the right environment variable for mounted fs · 24ef39f4
      Serge Hallyn authored
      If the container is dir-backed, we don't actually mount it (to
      support unprivileged use).  So always set the LXC_ROOTFS_MOUNT
      to bdev->dest, not to the rootfs path specified in the container
      configuration.
      
      This should fix bug http://pad.lv/1253573Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
      Acked-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
    • Setup devtmpfs and /dev for autodev bind mounts. · bc6928ff
      Michael H. Warfield authored
      If autodev is not specifically set to 0 or 1, attempts to determine if
      systemd is being utilized and forces autodev=1 to prevent host system
      conflicts and collisions.
      
      If autodev is enabled and the host /dev is mounted with devtmpfs
      or /dev/.lxc is mounted with another file system...
      
      Each container created by a privileged user gets a /dev directory
      mapped off the host /dev here:
      
      	/dev/.lxc/${name}.$( hash $lxcpath/$name )
      
      Each container created by a non-privileged user gets a /dev/directory
      mapped off the host /dev here:
      
      	/dev/.lxc/user/${name}.$( hash $lxcpath/$name )
      
      The /dev/.lxc/user is mode 1777 to allow unpriv access.
      
      The /dev/.lxc/{containerdev} is bind mounted into the container /dev.
      
      Fallback on failure is to mount tmpfs into the container /dev.
      
      A symlink is created from $lxcpath/$name/rootfs.dev back to the /dev
      relative directory to provid a code consistent reference for updating
      container devs.
      Signed-off-by: 's avatarMichael H. Warfield <mhw@WittsEnd.com>
      Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
  6. 20 Nov, 2013 1 commit
    • lxc-attach: elevate specific privileges · 4d69b293
      Nikola Kotur authored
      There are scenarios in which we want to execute process with specific
      privileges elevated.
      
      An example for this might be executing a process inside the container
      securely, with capabilities dropped, but not in container's cgroup so
      that we can have per process restrictions inside single container.
      
      Similar to namespaces, privileges to be elevated can be OR'd:
      
          lxc-attach --elevated-privileges='CAP|CGROUP' ...
      
      Backward compatibility with previous versions is retained. In case no
      privileges are specified behaviour is the same as before: all of them
      are elevated.
      Signed-off-by: 's avatarNikola Kotur <kotnick@gmail.com>
      Acked-By: 's avatarChristian Seiler <christian@iwakd.de>
      Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>