ntdll-TokenLogonSid: Fix some test failures.

This commit is contained in:
Sebastian Lackner 2017-10-05 13:55:07 +02:00
parent 3945cbfe36
commit d677406b2a
2 changed files with 37 additions and 9 deletions

View File

@ -1,18 +1,46 @@
From 5e36c591d2d8a8c175afad91878909d11a92a00c Mon Sep 17 00:00:00 2001
From 691e58a26a95239493cadde8687b5870cccda501 Mon Sep 17 00:00:00 2001
From: Andrew Wesie <awesie@gmail.com>
Date: Wed, 3 May 2017 14:59:38 -0500
Subject: ntdll: TokenLogonSid stub in NtQueryInformationToken.
Signed-off-by: Andrew Wesie <awesie@gmail.com>
---
dlls/ntdll/nt.c | 28 +++++++++++++++++++++++++++-
1 file changed, 27 insertions(+), 1 deletion(-)
dlls/advapi32/tests/security.c | 6 +++---
dlls/ntdll/nt.c | 28 +++++++++++++++++++++++++++-
2 files changed, 30 insertions(+), 4 deletions(-)
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
index d41e42e24fa..09f14f0d4eb 100644
--- a/dlls/advapi32/tests/security.c
+++ b/dlls/advapi32/tests/security.c
@@ -1841,11 +1841,11 @@ static void test_token_attr(void)
todo_wine win_skip("TokenLogonSid not supported. Skipping tests\n");
else
{
- todo_wine ok(!ret && (GetLastError() == ERROR_INSUFFICIENT_BUFFER),
+ ok(!ret && (GetLastError() == ERROR_INSUFFICIENT_BUFFER),
"GetTokenInformation(TokenLogonSid) failed with error %d\n", GetLastError());
Groups = HeapAlloc(GetProcessHeap(), 0, Size);
ret = GetTokenInformation(Token, TokenLogonSid, Groups, Size, &Size);
- todo_wine ok(ret,
+ ok(ret,
"GetTokenInformation(TokenLogonSid) failed with error %d\n", GetLastError());
if (ret)
{
@@ -1858,7 +1858,7 @@ static void test_token_attr(void)
/* S-1-5-5-0-XXXXXX */
ret = IsWellKnownSid(Groups->Groups[0].Sid, WinLogonIdsSid);
- ok(ret, "Unknown SID\n");
+ todo_wine ok(ret, "Unknown SID\n");
}
}
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index a793b572211..b0473a5ffd9 100644
index 8938d5d71c1..31b8bc75f29 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -271,6 +271,21 @@ NTSTATUS WINAPI NtQueryInformationToken(
@@ -254,6 +254,21 @@ NTSTATUS WINAPI NtQueryInformationToken(
ULONG tokeninfolength,
PULONG retlen )
{
@ -34,7 +62,7 @@ index a793b572211..b0473a5ffd9 100644
static const ULONG info_len [] =
{
0,
@@ -301,7 +316,7 @@ NTSTATUS WINAPI NtQueryInformationToken(
@@ -284,7 +299,7 @@ NTSTATUS WINAPI NtQueryInformationToken(
sizeof(TOKEN_MANDATORY_LABEL) + sizeof(SID), /* TokenIntegrityLevel [sizeof(SID) includes one SubAuthority] */
0, /* TokenUIAccess */
0, /* TokenMandatoryPolicy */
@ -43,7 +71,7 @@ index a793b572211..b0473a5ffd9 100644
sizeof(DWORD), /* TokenIsAppContainer */
0, /* TokenCapabilities */
sizeof(TOKEN_APPCONTAINER_INFORMATION) + sizeof(SID), /* TokenAppContainerSid */
@@ -569,6 +584,17 @@ NTSTATUS WINAPI NtQueryInformationToken(
@@ -552,6 +567,17 @@ NTSTATUS WINAPI NtQueryInformationToken(
*(DWORD*)tokeninfo = 0;
break;
}
@ -62,5 +90,5 @@ index a793b572211..b0473a5ffd9 100644
{
ERR("Unhandled Token Information class %d!\n", tokeninfoclass);
--
2.12.2
2.14.1

View File

@ -3344,7 +3344,7 @@ fi
# Patchset ntdll-TokenLogonSid
# |
# | Modified files:
# | * dlls/ntdll/nt.c
# | * dlls/advapi32/tests/security.c, dlls/ntdll/nt.c
# |
if test "$enable_ntdll_TokenLogonSid" -eq 1; then
patch_apply ntdll-TokenLogonSid/0001-ntdll-TokenLogonSid-stub-in-NtQueryInformationToken.patch