1. 17 Nov, 2016 34 commits
  2. 12 Nov, 2015 1 commit
  3. 10 Nov, 2015 1 commit
  4. 09 Nov, 2015 1 commit
  5. 06 Nov, 2015 3 commits
    • arch template: Fix systemd-sysctl service · 60507848
      Jakub Sztandera authored
      The systemd-sysctl service includes condition that /proc/sys/ has to be read-write.
      In lxc only /proc/sys/net/ is read-write which causes the condition to fail and service not to run.
      This patch changes the check to /proc/sys/net/ and makes the service apply only rules that are in net tree.
      Signed-off-by: 's avatarJakub Sztandera <kubuxu@gmail.com>
    • Simplify function · 752b36f5
      Christian Brauner authored
      Instead of duplicating the cleanup-code, once for success and once for failure,
      simply keep a variable fret which is -1 in the beginning and gets set to 0 on
      success or stays -1 on failure.
      Signed-off-by: 's avatarChristian Brauner <christianvanbrauner@gmail.com>
      Acked-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
    • Parse rootfs->path · 5e2c13c0
      Christian Brauner authored
      The mount_entry_overlay_dirs() and mount_entry_aufs_dirs() functions create
      workdirs and upperdirs for overlay and aufs lxc.mount.entry entries. They try
      to make sure that the workdirs and upperdirs can only be created under the
      containerdir (e.g. /path/to/the/container/CONTAINERNAME). In order to do this
      the right hand side of
      
                      if ((strncmp(upperdir, lxcpath, dirlen) == 0) && (strncmp(upperdir, rootfs->path, rootfslen) != 0))
      
      was thought to check if the rootfs->path is not present in the workdir and
      upperdir mount options. But the current check is bogus since it will be
      trivially true whenever the container is a block-dev or overlay or aufs backed
      since the rootfs->path will then have a form like e.g.
      
              overlayfs:/some/path:/some/other/path
      
      This patch adds the function ovl_get_rootfs_dir() which parses rootfs->path by
      searching backwards for the first occurrence of the delimiter pair ":/". We do
      not simply search for ":" since it might be used in path names. If ":/" is not
      found we assume the container is directory backed and simply return
      strdup(rootfs->path).
      Signed-off-by: 's avatarChristian Brauner <christianvanbrauner@gmail.com>
      Acked-by: 's avatarSerge E. Hallyn <serge.hallyn@ubuntu.com>