-
Notifications
You must be signed in to change notification settings - Fork 189
CFE-3429: Use current process ID to investigate proc filesystem to workaround in-container non-root owned symlinks (3.24) #5780
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
base: 3.24.x
Are you sure you want to change the base?
Conversation
craigcomstock
commented
Apr 23, 2025
- Use current process ID to investigate proc filesystem to workaround in-container non-root owned symlinks
- Added error message when netstat file is not found during UNIX interface discovery.
- Move GetRelocatedProcdirRoot() from libntech and add GetProcdirPid()
- Added env var pid override in proc-net acceptance test To align with change to reading /proc//...
- bump libntech to master
…n-container non-root owned symlinks Note man 5 proc mentions how the symlinks work: /proc/self When a process accesses this magic symbolic link, it resolves to the process's own /proc/pid directory. and also: With the advent of network namespaces, various information relating to the network stack is virtualized (see net‐ work_namespaces(7)). Thus, since Linux 2.6.25, /proc/net is a symbolic link to the directory /proc/self/net, which contains the same files and directories as listed below. However, these files and directories now expose informa‐ tion for the network namespace of which the process is a member. So this change seems like a good workaround for linux systems and CFEngine's requirement that symlinks be owned by the running pid. Ticket: CFE-3429 Changelog: title Signed-off-by: Craig Comstock <[email protected]> (cherry picked from commit 031972b)
…ace discovery. Ticket: CFE-3429 Changelog: none (cherry picked from commit 8441e84)
These have checks for environment variables to override to support testing. Ticket: CFE-3429 Changelog: none (cherry picked from commit 628055f)
To align with change to reading /proc/<pid>/... Ticket: CFE-3429 Changelog: none (cherry picked from commit 8470d79)
Thanks for submitting a pull request! Maybe @larsewi can review this? |
Marking this PR as stale due to inactivity; it will be closed in 7 days. |
Closing PR due to inactivity. Feel free to open a new PR if necessary. |
@craigcomstock , looks like this one auto-closed, re-opening. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have been using 3.27 nightly for some container stuff. Would be nice to have this back in 3.24.