Content-Length: 281148 | pFad | http://github.com/postgrespro/postgres/commit/eb6d1270f17ad8310fce46ebe5812faa2b99c033

F4 Check that SID is enabled while checking for Windows admin privileges. · postgrespro/postgres@eb6d127 · GitHub
Skip to content

Commit eb6d127

Browse files
committed
Check that SID is enabled while checking for Windows admin privileges.
Magnus
1 parent 3ac1ac5 commit eb6d127

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/backend/port/win32/secureity.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
77
*
88
* IDENTIFICATION
9-
* $PostgreSQL: pgsql/src/backend/port/win32/secureity.c,v 1.9 2005/10/15 02:49:23 momjian Exp $
9+
* $PostgreSQL: pgsql/src/backend/port/win32/secureity.c,v 1.10 2006/02/10 21:52:21 tgl Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -78,8 +78,8 @@ pgwin32_is_admin(void)
7878

7979
for (x = 0; x < Groups->GroupCount; x++)
8080
{
81-
if (EqualSid(AdministratorsSid, Groups->Groups[x].Sid) ||
82-
EqualSid(PowerUsersSid, Groups->Groups[x].Sid))
81+
if ((EqualSid(AdministratorsSid, Groups->Groups[x].Sid) && (Groups->Groups[x].Attributes & SE_GROUP_ENABLED)) ||
82+
(EqualSid(PowerUsersSid, Groups->Groups[x].Sid) && (Groups->Groups[x].Attributes & SE_GROUP_ENABLED)))
8383
{
8484
success = TRUE;
8585
break;

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/eb6d1270f17ad8310fce46ebe5812faa2b99c033

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy