-
-
Notifications
You must be signed in to change notification settings - Fork 282
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
Add Process::{effective_user_id, effective_group_id} + user_id & group_id to return real IDs #977
Merged
GuillaumeGomez
merged 4 commits into
GuillaumeGomez:master
from
mercedes-benz:effective-ids
May 5, 2023
Merged
Add Process::{effective_user_id, effective_group_id} + user_id & group_id to return real IDs #977
GuillaumeGomez
merged 4 commits into
GuillaumeGomez:master
from
mercedes-benz:effective-ids
May 5, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
They were returing the effective IDs, which is unexpected and inconsistent with FreeBSD impl.
Getting the UID/GID by looking at the ownership of the relevant /proc file of a process is strange. The UID/GID are provided in the status file itself that we read anyway if this method fails. Let's always take the UID/GID from the process' status file. This also paves way for reliably getting the effective UID/GID of a process, that we will be adding in a following commit.
You forgot to implement the new methods on Windows. 😉 |
zeenix
force-pushed
the
effective-ids
branch
2 times, most recently
from
May 5, 2023 15:14
65295ca
to
45fe64a
Compare
GuillaumeGomez
approved these changes
May 5, 2023
Looks all good to me, thanks! Just waiting for the CI to finish and then I merge (should fail for "unknown-target", should fix that some day...). |
Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add API to query effective IDs of a process and make
Process::{user_id, group_id}
return real IDs on Linux and Apple, so the behavior is as expected and consistent with the FreeBSD implementation.Fixes #970.
Zeeshan Ali Khan on behalf of MBition GmbH.
Provider Information.