-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
psutil only returns uids of user-owned process on Solaris 10 #1193
Labels
Comments
Can you provide a PR? |
gsauthof
added a commit
to gsauthof/psutil
that referenced
this issue
Mar 15, 2018
Merged
gsauthof
added a commit
to gsauthof/psutil
that referenced
this issue
Mar 17, 2018
giampaolo
pushed a commit
that referenced
this issue
Mar 17, 2018
* Fix nice() for realtime processes under Solaris 10 fixes #1194 * Use psinfo as fallback [gu]id source on Solaris 10 fixes #1193 * Fix double free * Match ssize_t return type of read functions * Fix undefined behavior with respect to strict aliasing rules and fix some warnings For example, under strict aliasing rules of the C standard, casting a char pointer to a struct pointer and accessing the character array through that struct pointer yields undefined behavior. * Update HISTORY with Solaris notes
giampaolo
added a commit
that referenced
this issue
Mar 17, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to reproduce:
As normal user, chose a PID of another user:
The thing is that psutil tries to read the uids from
/proc/$pid/cred
that is always only user-readable on Solaris 10:A better choice on Solaris 10 is to use
/proc/$pid/psinfo
since it also contains the uids (modulo the saved user id) - and is readable by everyone. Thus, if psutil really cares about the saved user id, it could also try/proc/$pid/cred
first and then fall back to/proc/$pid/psinfo
.For our example:
The text was updated successfully, but these errors were encountered: