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

container: attempt chdir twice #794

Merged
merged 2 commits into from
Nov 30, 2021
Merged

Conversation

giuseppe
Copy link
Member

the chdir could fail if it is performed while running as "root in the user namespace" and the access to the working directory is controlledby an ACL to grant permission to the specified final UID:GID.

Closes: #793

Signed-off-by: Giuseppe Scrivano gscrivan@redhat.com

the chdir could fail if it is performed while running as "root in the
user namespace" and the access to the working directory is controlled
by an ACL to grant permission to the specified final UID:GID.

Closes: containers#793

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
the exec entrypoint is growing out of control, so take the occasion to
move to a separate function.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
@rhatdan
Copy link
Member

rhatdan commented Nov 30, 2021

I thought that runc has a similar issue. @debarshiray can you verify this also fails with runc, if so we should report it to @kolyshkin
LGTM

@haircommander
Copy link
Contributor

haircommander commented Nov 30, 2021

it did but we also updated to call chdir twice opencontainers/runc#2894 (so I hope it works with runc haha)

@rhatdan rhatdan merged commit ebad9d7 into containers:main Nov 30, 2021
@kolyshkin
Copy link
Collaborator

it did but we also updated to call chdir twice opencontainers/runc#2894 (so I hope it works with runc haha)

Yes, thanks! I have checked that it does (using the scenario from #793).
While we do not have test case for runc exec (only for runc run), both use finalizeNamespace which does chdir twice, thanks to opencontainers/runc#2894. Not sure why we did not checked it with crun before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to enter Toolbx container when in /run/media/$USER
4 participants