Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libcontainer: skip chown of /dev/null caused by fd redirection #3707

Merged
merged 2 commits into from
Feb 7, 2023

Commits on Feb 3, 2023

  1. libcontainer: skip chown of /dev/null caused by fd redirection

    In 18c4760 (libct: fixStdioPermissions: skip chown if not needed)
    the check whether the STDIO file descriptors point to /dev/null was
    removed which can cause /dev/null to change ownership e.g. when using
    docker exec on a running container:
    
    $ ls -l /dev/null
    crw-rw-rw- 1 root root 1, 3 Aug 1 14:12 /dev/null
    $ docker exec -u test 0ad6d3064e9d ls
    $ ls -l /dev/null
    crw-rw-rw- 1 test root 1, 3 Aug 1 14:12 /dev/null
    
    Signed-off-by: Jaroslav Jindrak <dzejrou@gmail.com>
    Dzejrou committed Feb 3, 2023
    Configuration menu
    Copy the full SHA
    7e5e017 View commit details
    Browse the repository at this point in the history
  2. tests/int: test for /dev/null owner regression

    Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
    kolyshkin authored and Dzejrou committed Feb 3, 2023
    Configuration menu
    Copy the full SHA
    1bb6209 View commit details
    Browse the repository at this point in the history