aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xlogfuncs.c
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2017-03-17 11:14:01 +0200
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2017-03-17 11:14:36 +0200
commit38bdba54a64bacec78e3266f0848b0b4a824132a (patch)
treeaadf7ca46c400d868c6507083557db2cfddca7fc /src/backend/access/transam/xlogfuncs.c
parent9b626f6c334f95f1052b22b13d9ddbcc4de5fc4f (diff)
downloadpostgresql-38bdba54a64bacec78e3266f0848b0b4a824132a.tar.gz
postgresql-38bdba54a64bacec78e3266f0848b0b4a824132a.zip
Fix and simplify check for whether we're running as Windows service.
If the process token contains SECURITY_SERVICE_RID, but it has been disabled by the SE_GROUP_USE_FOR_DENY_ONLY attribute, win32_is_service() would incorrectly report that we're running as a service. That situation arises, e.g. if postmaster is launched with a restricted security token, with the "Log in as Service" privilege explicitly removed. Replace the broken code with CheckProcessTokenMembership(), which does this correctly. Also replace similar code in win32_is_admin(), even though it got this right, for simplicity and consistency. Per bug #13755, reported by Breen Hagan. Back-patch to all supported versions. Patch by Takayuki Tsunakawa, reviewed by Michael Paquier. Discussion: https://www.postgresql.org/message-id/20151104062315.2745.67143%40wrigleys.postgresql.org
Diffstat (limited to 'src/backend/access/transam/xlogfuncs.c')
0 files changed, 0 insertions, 0 deletions