From a1ffc8d05aac743f5ec560a4f8f564e0b6cb8058 Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Tue, 30 Dec 2008 17:10:40 +0000 Subject: [PATCH] fix some more security winetests svn path=/trunk/; revision=38475 --- reactos/dll/win32/advapi32/sec/misc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/reactos/dll/win32/advapi32/sec/misc.c b/reactos/dll/win32/advapi32/sec/misc.c index 70cd6466d1a..9781b2a1976 100644 --- a/reactos/dll/win32/advapi32/sec/misc.c +++ b/reactos/dll/win32/advapi32/sec/misc.c @@ -1461,6 +1461,12 @@ LookupPrivilegeValueW(LPCWSTR SystemName, }; unsigned Priv; + if (!ADVAPI_IsLocalComputer(SystemName)) + { + SetLastError(RPC_S_SERVER_UNAVAILABLE); + return FALSE; + } + if (NULL != SystemName && L'\0' != *SystemName) { FIXME("LookupPrivilegeValueW: not implemented for remote system\n"); @@ -1601,6 +1607,7 @@ LookupPrivilegeNameW(LPCWSTR lpSystemName, SetLastError(RPC_S_SERVER_UNAVAILABLE); return FALSE; } + if (lpLuid->HighPart || (lpLuid->LowPart < SE_MIN_WELL_KNOWN_PRIVILEGE || lpLuid->LowPart > SE_MAX_WELL_KNOWN_PRIVILEGE)) {