1. 27 Sep, 2018 7 commits
    • Alexis Janon's avatar
      Fixed errors introduced in bfead0fa · 1924e567
      Alexis Janon authored
      Was displaying an Option<PathBuf> with a debug print. However, at that
      point this option is necessarily None, therefore the error did not add
      much more information. It now prints the key and slice name.
      1924e567
    • Alexis Janon's avatar
      09673e7a
    • Alexis Janon's avatar
      Now display path using path.display instead of debug output · 2275dee4
      Alexis Janon authored
      Much cleaner, and more robust as the output should not change (the debug
      output may evolve depending on the needs of the upstream developers)
      2275dee4
    • Alexis Janon's avatar
      Update TODO for check_path · 18d1f00f
      Alexis Janon authored
      18d1f00f
    • Alexis Janon's avatar
      bfead0fa
    • Alexis Janon's avatar
      174fce88
    • Alexis Janon's avatar
      Check_path method for sysfscontrollerlist · bb62ce62
      Alexis Janon authored
      Checks that a given path is authorized by first resolving any references
      to parent directories, and then checking if the path starts with the
      path to a controller. This basically creates an absolute path (but not
      necessarily canonical!)
      More precisely, starting from the root, on each element of the path:
      - if it is a 'normal' element: push it at the end of the current
      built path
      - it if is a 'parent dir' (..): pop the last element of the current path
      (i.e. go up a level)
      After processing all components of a path, we get an absolute path.
      This is then checked against the controllers paths.
      For now, this algorithm seems to work pretty well on simple and more
      complex examples. It ignores references to the root dir in the input
      path (because that is the starting point of the algorithm). In
      addition, it also ignores references to the current directory (.)
      There is currently no symlink resolution, nor is there a check to ensure
      the user is not trying to write in the root cgroup controller, or in the
      controller of cuttr (if there is one). This will probably be added in
      the future by parsing /proc/self/cgroup which contains the list of
      cgroup the current process belongs to.
      bb62ce62
  2. 24 Sep, 2018 5 commits
  3. 22 Sep, 2018 3 commits
  4. 21 Sep, 2018 9 commits
  5. 20 Sep, 2018 2 commits
  6. 19 Sep, 2018 8 commits
  7. 18 Sep, 2018 6 commits