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

runtime: incorrect constant value for PROCESS_ALL_ACCESS #29176

Open
Rojuinex opened this issue Dec 11, 2018 · 1 comment · May be fixed by #29179

Comments

@Rojuinex
Copy link

@Rojuinex Rojuinex commented Dec 11, 2018

_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
@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Dec 11, 2018

Change https://golang.org/cl/153717 mentions this issue: runtime: PROCESS_ALL_ACCESS didn't check for 0XFFFF

@ALTree ALTree changed the title Incorrect constant value runtime: incorrect constant value forPROCESS_ALL_ACCESS Dec 12, 2018
@ALTree ALTree changed the title runtime: incorrect constant value forPROCESS_ALL_ACCESS runtime: incorrect constant value for PROCESS_ALL_ACCESS Dec 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.