go 运行时:进程访问权限的常量值不正确,

dpiehjr4  于 6个月前  发布在  Go
关注(0)|答案(1)|浏览(42)

go/src/runtime/syscall_windows_test.go
Line 815 in 01e072d
| | _PROCESS_ALL_ACCESS=syscall.STANDARD_RIGHTS_REQUIRED|syscall.SYNCHRONIZE|0xfff |
From winnt.h we can see that if we are running on a version of Windows greater than Vista, 0xFFFF should be or-ed with the STANDARD_RIGHTS_REQUIRED and SYNCHRONIZE flags.

  • winnt.h#L11279*
#if (NTDDI_VERSION >= NTDDI_VISTA)
#define PROCESS_ALL_ACCESS        (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | \
                                   0xFFFF)
#else
#define PROCESS_ALL_ACCESS        (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | \
                                   0xFFF)
#endif
5t7ly7z5

5t7ly7z51#

https://golang.org/cl/153717提到了这个问题:runtime: PROCESS_ALL_ACCESS didn't check for 0XFFFF

相关问题