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 procfs on /proc/self with user namespaces #859

Merged
merged 5 commits into from
Sep 29, 2023

Conversation

sunfishcode
Copy link
Member

Use readlink on the /proc/self symlink instead of getpid, so that we get the pid relative to the procfs's pid namespace rather than the process' pid namespace.

Fixes #854.

Use `readlink` on the /proc/self symlink instead of `getpid`, so
that we get the pid relative to the procfs's pid namespace rather
than the process' pid namespace.

Fixes #854.
@sunfishcode sunfishcode force-pushed the sunfishcode/pid-namespace branch from f6435a6 to 60b016d Compare September 29, 2023 05:59
@sunfishcode sunfishcode merged commit 69319a3 into main Sep 29, 2023
43 checks passed
@sunfishcode sunfishcode deleted the sunfishcode/pid-namespace branch September 29, 2023 20:52
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.

proc_self_*() functions can open the wrong process's files
1 participant