09 Jun, 2022

2 commits

  • commit 81709f3dccacf4104a4bc2daa80bdd767a9c4c54 upstream.

    Let's follow a consistent and documented coding style. Everything may
    not be to our liking but it is better than tacit knowledge. Moreover,
    this will help maintain style consistency between different developers.

    This contains only whitespace changes.

    Automatically formatted with:
    clang-format-14 -i samples/landlock/*.[ch]

    Link: https://lore.kernel.org/r/20220506160513.523257-8-mic@digikod.net
    Cc: stable@vger.kernel.org
    Signed-off-by: Mickaël Salaün
    Signed-off-by: Greg Kroah-Hartman

    Mickaël Salaün
     
  • commit 9805a722db071e1772b80e6e0ff33f35355639ac upstream.

    In preparation to a following commit, add clang-format on and
    clang-format off stanzas around constant definitions. This enables to
    keep aligned values, which is much more readable than packed
    definitions.

    Link: https://lore.kernel.org/r/20220506160513.523257-7-mic@digikod.net
    Cc: stable@vger.kernel.org
    Signed-off-by: Mickaël Salaün
    Signed-off-by: Greg Kroah-Hartman

    Mickaël Salaün
     

08 Apr, 2022

1 commit

  • commit 66b513b7c64a7290c1fbb88e657f7cece992e131 upstream.

    Clang static analysis reports this error

    sandboxer.c:134:8: warning: Potential leak of memory
    pointed to by 'path_list'
    ret = 0;
    ^
    path_list is allocated in parse_path() but never freed.

    Signed-off-by: Tom Rix
    Link: https://lore.kernel.org/r/20210428213852.2874324-1-trix@redhat.com
    Cc: stable@vger.kernel.org
    Signed-off-by: Mickaël Salaün
    Signed-off-by: Greg Kroah-Hartman

    Tom Rix
     

23 Apr, 2021

1 commit

  • Add a basic sandbox tool to launch a command which can only access a
    list of file hierarchies in a read-only or read-write way.

    Cc: James Morris
    Cc: Serge E. Hallyn
    Signed-off-by: Mickaël Salaün
    Reviewed-by: Jann Horn
    Reviewed-by: Kees Cook
    Link: https://lore.kernel.org/r/20210422154123.13086-12-mic@digikod.net
    Signed-off-by: James Morris

    Mickaël Salaün