Skip to content

Chcon,Relabel: process the argument last#161

Merged
thaJeztah merged 1 commit intoopencontainers:mainfrom
kolyshkin:relabel-last
Oct 5, 2021
Merged

Chcon,Relabel: process the argument last#161
thaJeztah merged 1 commit intoopencontainers:mainfrom
kolyshkin:relabel-last

Conversation

@kolyshkin
Copy link
Copy Markdown
Collaborator

@kolyshkin kolyshkin commented Sep 27, 2021

Modify pwalk and pwalkdir to make sure the path itself is added last.

This adds a guarantee that Chcon/Relabel will relabel the top-level
directory (i.e. the argument) only after all its descendants are
relabeled, thus creating a possibility to do conditional relabeling.

Benchmarks showed no noticeable difference in performance.

Modify pwalk and pwalkdir to make sure the path itself is added last.

This adds a guarantee that Chcon/Relabel will relabel the top-level
directory (i.e. the argument) only after all its descendants are
relabeled, thus creating a possibility to do conditional relabeling.

Signed-off-by: Kir Kolyshkin <[email protected]>
Copy link
Copy Markdown
Collaborator

@rhatdan rhatdan left a comment

Choose a reason for hiding this comment

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

LGTM

@kolyshkin
Copy link
Copy Markdown
Collaborator Author

@thaJeztah PTAL

Copy link
Copy Markdown
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 19e996e into opencontainers:main Oct 5, 2021
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.

3 participants