[newlib-cygwin] Cygwin: proc: don't request PROCESS_VM_READ perms for stat
Corinna Vinschen
corinna@sourceware.org
Tue Mar 12 10:48:00 GMT 2019
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=4ce7e1bbaacf007197e348e4d11ec6258f508873
commit 4ce7e1bbaacf007197e348e4d11ec6258f508873
Author: Corinna Vinschen <corinna@vinschen.de>
Date: Tue Mar 12 11:20:42 2019 +0100
Cygwin: proc: don't request PROCESS_VM_READ perms for stat
The OpenProcess call to generate /proc/<PID>/stat info requests
PROCESS_VM_READ, but that's not required. Drop it.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diff:
---
winsup/cygwin/fhandler_process.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/winsup/cygwin/fhandler_process.cc b/winsup/cygwin/fhandler_process.cc
index 06325ca..576c5cb 100644
--- a/winsup/cygwin/fhandler_process.cc
+++ b/winsup/cygwin/fhandler_process.cc
@@ -1097,7 +1097,7 @@ format_process_stat (void *data, char *&destbuf)
QUOTA_LIMITS ql;
SYSTEM_TIMEOFDAY_INFORMATION stodi;
SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION spt;
- hProcess = OpenProcess (PROCESS_QUERY_LIMITED_INFORMATION | PROCESS_VM_READ,
+ hProcess = OpenProcess (PROCESS_QUERY_LIMITED_INFORMATION,
FALSE, p->dwProcessId);
if (hProcess == NULL)
{
More information about the Cygwin-cvs
mailing list