Description
There is a function in pg_service_test.c which checks if the process is running as a service. It was extracted from PostgreSQL code and modified a bit (to add debug outputs). CheckTokenMembership should set isMember to FALSE here (when running as local admin) but it is not.
I think that using NtAccessCheck with some random access mask (or it is not random?) here is not a reliable way to do the check.
Compiled exe file from this code is attached
Attachments
Issue Links
- blocks
-
CORE-10904 MinGW PostgreSQL builds do not work correctly
- Untriaged
- is blocked by
-
CORE-9184 SepAccessCheckEx is broken
- Resolved