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

overlay: Fix root directoy state with extended attributes #1953

Merged
merged 6 commits into from
Jun 11, 2024

Conversation

akihikodaki
Copy link
Contributor

The upper layer inherits the root directory state (UID, GID, and mode) from the lower layer. The current code does not respect extended attributes in the process so this pull request implements necessary procedures.

Concretely, we must respect the lower layer's extended attribute if present. If "force mask" option is set, the upper layer should set the state to the extended attribute instead of modifying the real directory state.

Copy link
Member

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

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

do you have any tests case where the current code currently fails?

Could we add a test?

pkg/idtools/idtools.go Outdated Show resolved Hide resolved
@akihikodaki
Copy link
Contributor Author

do you have any tests case where the current code currently fails?

Could we add a test?

Added a test with commit 399c519.

Copy link
Member

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

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

LGTM

@rhatdan
Copy link
Member

rhatdan commented Jun 10, 2024

/approve
/lgtm

@rhatdan
Copy link
Member

rhatdan commented Jun 10, 2024

@akihikodaki Sorry to say this needs a rebase.

Force mask is not being enforced when there is a lower layer so correct
it.

Signed-off-by: Akihiko Odaki <[email protected]>
Naively forcing mask for the root directory corrupts its mode in the
containers. Set the overriding extended attribute to fix the mode.

Signed-off-by: Akihiko Odaki <[email protected]>
Forcing mask implies the owner is fixed.

Signed-off-by: Akihiko Odaki <[email protected]>
@akihikodaki
Copy link
Contributor Author

@akihikodaki Sorry to say this needs a rebase.

Done.

Copy link
Member

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

openshift-ci bot commented Jun 11, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: akihikodaki, giuseppe, rhatdan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@rhatdan
Copy link
Member

rhatdan commented Jun 11, 2024

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Jun 11, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit e87d2b4 into containers:main Jun 11, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants