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

[1.1] Fix tmpfs mode opts when dir already exists #3916

Merged
merged 1 commit into from
Jun 28, 2023

Conversation

neersighted
Copy link
Contributor

This is a backport of #3912 to the release-1.1 branch. Original description follows.


When a directory already exists (or after a container is restarted) the perms of the directory being mounted to were being used even when a different permission is set on the tmpfs mount options.

This prepends the original directory perms to the mount options. If the perms were already set in the mount opts then those perms will win.
This eliminates the need to perform a chmod after mount entirely.

Fixes #3911

When a directory already exists (or after a container is restarted) the
perms of the directory being mounted to were being used even when a
different permission is set on the tmpfs mount options.

This prepends the original directory perms to the mount options.
If the perms were already set in the mount opts then those perms will
win.
This eliminates the need to perform a chmod after mount entirely.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 9fa8b9d)
Resolved conflicts:
	tests/integration/run.bats
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
@kolyshkin kolyshkin added this to the 1.1.8 milestone Jun 28, 2023
@kolyshkin kolyshkin added the backport/1.1-pr A backport to 1.1.x release. label Jun 28, 2023
Copy link
Contributor

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thaJeztah thaJeztah merged commit 207bd9d into opencontainers:release-1.1 Jun 28, 2023
29 checks passed
@neersighted neersighted deleted the backport_3912 branch June 28, 2023 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/1.1-pr A backport to 1.1.x release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants