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

Fix object path absolute paths #75

Merged
merged 1 commit into from
Sep 23, 2024
Merged

Fix object path absolute paths #75

merged 1 commit into from
Sep 23, 2024

Conversation

javierhonduco
Copy link
Owner

To support processes running in mount namespaces that aren't the root one we can access the files in their mount via procfs's root directory.

Not only this was broken in terms of the paths being joined, but also the way Path::join works is that the joined path starts with a slash (so it's recognised as absolute) it will replace the whole path (!).

This was reported upstream in
rust-lang/rust#16507.

Test Plan

Ran lightswitch for a little bit, and containerised workloads worked fine.

To support processes running in mount namespaces that aren't the root
one we can access the files in their mount via procfs's root directory.

Not only this was broken in terms of the paths being joined, but also
the way `Path::join` works is that the joined path starts with a slash
(so it's recognised as absolute) it will replace the whole path (!).

This was reported upstream in
rust-lang/rust#16507.

Test Plan
=========

Ran lightswitch for a little bit, and containerised workloads worked
fine.
@javierhonduco javierhonduco merged commit c769e42 into main Sep 23, 2024
4 checks passed
@javierhonduco javierhonduco deleted the fix-absolute-path branch September 23, 2024 14:18
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.

1 participant