https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d3101db2c7164f2e03314…
commit d3101db2c7164f2e033143bc8d2dc8deaf735e1a
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Thu Jul 13 17:14:19 2023 +0200
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Sat Jul 15 20:50:16 2023 +0200
[ADVAPI32] "Minimally" improve the SaferComputeTokenFromLevel() stub.
(#5435)
CORE-14015, CORE-6942
This makes Windows 2003 CMD.EXE to start batch files again.
Addendum to commit 17d42ae2a (r58868).
Replaces PR #3084 by freely importing and adapting Wine patch
https://github.com/wine-mirror/wine/commit/17110a0a890d2bacb5b348bd9bb3cef1…
```
advapi32: Improve the SaferComputeTokenFromLevel stub.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=47274
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
```
---
dll/win32/advapi32/sec/safer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dll/win32/advapi32/sec/safer.c b/dll/win32/advapi32/sec/safer.c
index 3905db18cea..31755dbadb2 100644
--- a/dll/win32/advapi32/sec/safer.c
+++ b/dll/win32/advapi32/sec/safer.c
@@ -155,8 +155,8 @@ SaferComputeTokenFromLevel(
_Inout_opt_ PVOID pReserved)
{
FIXME("(%p, %p, %p, 0x%lx, %p) stub\n", LevelHandle, InAccessToken,
OutAccessToken, dwFlags, pReserved);
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
+ *OutAccessToken = (dwFlags & SAFER_TOKEN_NULL_IF_EQUAL) ? NULL :
UlongToHandle(0xdeadf00d);
+ return TRUE;
}