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

Fcheung proc pidinfo #44

Merged
merged 4 commits into from
Aug 27, 2020
Merged

Fcheung proc pidinfo #44

merged 4 commits into from
Aug 27, 2020

Conversation

schneems
Copy link
Member

No description provided.

The problem with the mach task_info routines is that on modern versions of
macos they require the task_for_pid-allow entitlement in order to get the
mach_task for another process (because there's all sorts of nefarious
things you can do with the mach port)

Since macos 10.5 the proc_* family of functions are a better way for getting
read-only information about processes.
The api we call to get task info will raise this if you don't have
permission (eg trying to get info about another user's processes
when not root). By returning nil we'll fall back to the base case
of shelling out to `ps` (which doesn't have this issue because `ps` is
installed setuid & with the correct entitlements for this)
@schneems
Copy link
Member Author

Fix tests for #42

@schneems schneems merged commit 18b14ed into main Aug 27, 2020
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.

2 participants