Use PROCESS/THREAD_QUERY_LIMITED_INFORMATION where appropriate

Using PROCESS/THREAD_QUERY_INFORMATION may limit the number of
processes/threads we can inspect depending on their integrity level.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen
2016-06-27 17:56:16 +02:00
parent d21b63594c
commit ba58e5f20c
4 changed files with 20 additions and 13 deletions

View File

@@ -88,7 +88,8 @@ sched_getparam (pid_t pid, struct sched_param *param)
set_errno (ESRCH);
return -1;
}
process = OpenProcess (PROCESS_QUERY_INFORMATION, FALSE, p->dwProcessId);
process = OpenProcess (PROCESS_QUERY_LIMITED_INFORMATION, FALSE,
p->dwProcessId);
if (!process)
{
set_errno (ESRCH);