X-Git-Url: https://git.exim.org/users/heiko/exim.git/blobdiff_plain/b6c6011da086cbf47cfae6f43f8f22443ad62090..1fb7660fc893265f0e37ceb965396d9e005a0b74:/src/OS/os.c-cygwin diff --git a/src/OS/os.c-cygwin b/src/OS/os.c-cygwin index a3b4c643f..ea17a436e 100644 --- a/src/OS/os.c-cygwin +++ b/src/OS/os.c-cygwin @@ -1,5 +1,3 @@ -/* $Cambridge: exim/src/OS/os.c-cygwin,v 1.3 2005/08/02 09:09:27 ph10 Exp $ - /************************************************* * Exim - an Internet mail transport agent * *************************************************/ @@ -49,6 +47,8 @@ unsigned int cygwin_WinVersion; #endif #include +#define EqualLuid(Luid1, Luid2) \ + ((Luid1.LowPart == Luid2.LowPart) && (Luid1.HighPart == Luid2.HighPart)) #include /* Special static variables */ @@ -130,9 +130,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))