[COMMITTERS] pgsql: Fix and simplify check for whether we're running as Windowsserv

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема [COMMITTERS] pgsql: Fix and simplify check for whether we're running as Windowsserv
Дата
Msg-id E1coo2A-0004wV-T2@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
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

Branch
------
REL9_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/6b584c36a40ca68bd7f1943eb34ce1507b16bb2c

Modified Files
--------------
src/backend/port/win32/security.c | 173 +++++++++-----------------------------
1 file changed, 38 insertions(+), 135 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Avoid having vacuum set reltuples to 0 onnon-empty relations in
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: [COMMITTERS] pgsql: Allow plaintext 'password' authentication when user has aSCRAM