diff options
author | Philip Hazel <ph10@hermes.cam.ac.uk> | 2006-03-08 09:43:10 +0000 |
---|---|---|
committer | Philip Hazel <ph10@hermes.cam.ac.uk> | 2006-03-08 09:43:10 +0000 |
commit | 2c5db4fd26b481bff53f546eed83d373db4f130b (patch) | |
tree | 797b1570e5484652b0db56b1a1a03e563f8f771d /src/OS/os.c-cygwin | |
parent | 2c9405c7ea3c805b3f26b45d2234cc6f4890fc7e (diff) |
New os.c-cygwin (and some minor WishList change I forgot to commit).
Diffstat (limited to 'src/OS/os.c-cygwin')
-rw-r--r-- | src/OS/os.c-cygwin | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/OS/os.c-cygwin b/src/OS/os.c-cygwin index 56b5a7184..f7230ac8d 100644 --- a/src/OS/os.c-cygwin +++ b/src/OS/os.c-cygwin @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/OS/os.c-cygwin,v 1.4 2005/10/03 09:53:38 ph10 Exp $ */ +/* $Cambridge: exim/src/OS/os.c-cygwin,v 1.5 2006/03/08 09:43:10 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -49,6 +49,8 @@ unsigned int cygwin_WinVersion; #endif #include <windows.h> +#define EqualLuid(Luid1, Luid2) \ + ((Luid1.LowPart == Luid2.LowPart) && (Luid1.HighPart == Luid2.HighPart)) #include <sys/cygwin.h> /* Special static variables */ @@ -130,9 +132,9 @@ static DWORD get_privileges () && GetTokenInformation(hToken, TokenPrivileges, privs, length, &length)))) { for (i = 0; i < privs->PrivilegeCount; i++) { - if (privs->Privileges[i].Luid.QuadPart == cluid.QuadPart) + if (EqualLuid(privs->Privileges[i].Luid, cluid)) ret |= CREATE_BIT; - else if (privs->Privileges[i].Luid.QuadPart == rluid.QuadPart) + else if (EqualLuid(privs->Privileges[i].Luid, rluid)) ret |= RESTORE_BIT; else continue; if (ret == (CREATE_BIT | RESTORE_BIT)) |