Re: Re: BUG #13755: pgwin32_is_service not checking if SECURITY_SERVICE_SID is disabled
Tsunakawa, Takayuki <tsunakawa.takay@jp.fujitsu.com>
From: "Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>
To: 'Michael Paquier' <michael.paquier@gmail.com>
Cc: MauMau <maumau307@gmail.com>, Breen Hagan <breen@rtda.com>, "Heikki
Linnakangas" <hlinnaka@iki.fi>, Alvaro Herrera <alvherre@2ndquadrant.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2016-11-08T06:31:10Z
Lists: pgsql-bugs, pgsql-hackers
From: Michael Paquier [mailto:michael.paquier@gmail.com] > I just looked more deeply at your refactoring patch, and I didn't know about > CheckTokenMembership()... The whole logic of your patch depends on it. > That's quite a cleanup that you have here. It looks that the former > implementation just had no knowledge of this routine or it would just have > been used. Yes, Microsoft recommends GetTokenMembership() because it's simpler. > + if (IsAdministrators || IsPowerUsers) > + return 1; > + else > + return 0; > I would remove the else here. IIRC, I sometimes saw this style of code in PostgreSQL (or in psqlODBC possibly...) I'd like to leave the style choice to the committer. Regards Takayuki Tsunakawa
Commits
-
Fix and simplify check for whether we're running as Windows service.
- 9c52ddfcee06 9.2.21 landed
- 3ebcc2498d2b 9.3.17 landed
- 6b584c36a40c 9.4.12 landed
- 96fd76dd2875 9.5.7 landed
- 38bdba54a64b 9.6.3 landed
- ff30aec759bd 10.0 landed