diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2006-02-10 21:52:34 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2006-02-10 21:52:34 +0000 |
commit | b919f3fcbb4bf64bc1469b882f56dfe95ba4143c (patch) | |
tree | 409b6212f75cf7c66a903eeeb33b20dd1cba2cb8 | |
parent | 2d26c4be8e65cad49365d0129d4ce9ba4769e9ec (diff) | |
download | postgresql-b919f3fcbb4bf64bc1469b882f56dfe95ba4143c.tar.gz postgresql-b919f3fcbb4bf64bc1469b882f56dfe95ba4143c.zip |
Check that SID is enabled while checking for Windows admin privileges.
Magnus
-rw-r--r-- | src/backend/port/win32/security.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/port/win32/security.c b/src/backend/port/win32/security.c index f610b893617..645dc46695a 100644 --- a/src/backend/port/win32/security.c +++ b/src/backend/port/win32/security.c @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/port/win32/security.c,v 1.9 2005/10/15 02:49:23 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/port/win32/security.c,v 1.9.2.1 2006/02/10 21:52:34 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -78,8 +78,8 @@ pgwin32_is_admin(void) for (x = 0; x < Groups->GroupCount; x++) { - if (EqualSid(AdministratorsSid, Groups->Groups[x].Sid) || - EqualSid(PowerUsersSid, Groups->Groups[x].Sid)) + if ((EqualSid(AdministratorsSid, Groups->Groups[x].Sid) && (Groups->Groups[x].Attributes & SE_GROUP_ENABLED)) || + (EqualSid(PowerUsersSid, Groups->Groups[x].Sid) && (Groups->Groups[x].Attributes & SE_GROUP_ENABLED))) { success = TRUE; break; |