From: Qian Hong qhong@codeweavers.com
Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com --- dlls/advapi32/security.c | 7 +++++-- dlls/advapi32/tests/security.c | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c index a7707f15d3..73c1f054d5 100644 --- a/dlls/advapi32/security.c +++ b/dlls/advapi32/security.c @@ -187,7 +187,7 @@ static const WCHAR Domain_Admins[] = { 'D','o','m','a','i','n',' ','A','d','m',' static const WCHAR Domain_Computers[] = { 'D','o','m','a','i','n',' ','C','o','m','p','u','t','e','r','s',0 }; static const WCHAR Domain_Controllers[] = { 'D','o','m','a','i','n',' ','C','o','n','t','r','o','l','l','e','r','s',0 }; static const WCHAR Domain_Guests[] = { 'D','o','m','a','i','n',' ','G','u','e','s','t','s',0 }; -static const WCHAR Domain_Users[] = { 'D','o','m','a','i','n',' ','U','s','e','r','s',0 }; +static const WCHAR None[] = { 'N','o','n','e',0 }; static const WCHAR Enterprise_Admins[] = { 'E','n','t','e','r','p','r','i','s','e',' ','A','d','m','i','n','s',0 }; static const WCHAR ENTERPRISE_DOMAIN_CONTROLLERS[] = { 'E','N','T','E','R','P','R','I','S','E',' ','D','O','M','A','I','N',' ','C','O','N','T','R','O','L','L','E','R','S',0 }; static const WCHAR Everyone[] = { 'E','v','e','r','y','o','n','e',0 }; @@ -1185,7 +1185,10 @@ LookupAccountSidW( ac = Domain_Admins; break; case DOMAIN_GROUP_RID_USERS: - ac = Domain_Users; + /* MSDN says the name of DOMAIN_GROUP_RID_USERS is Domain Users, + * tests show that MSDN seems to be wrong. */ + ac = None; + use = 2; break; case DOMAIN_GROUP_RID_GUESTS: ac = Domain_Guests; diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c index aee4587425..2c5fbcee6a 100644 --- a/dlls/advapi32/tests/security.c +++ b/dlls/advapi32/tests/security.c @@ -3003,8 +3003,8 @@ static void test_process_security(void) dom_size = sizeof(domain); ret = LookupAccountSidA( NULL, UsersSid, account, &acc_size, domain, &dom_size, &use ); ok(ret, "LookupAccountSid failed with %d\n", ret); - todo_wine ok(use == SidTypeGroup, "expect SidTypeGroup, got %d\n", use); - todo_wine ok(!strcmp(account, "None"), "expect None, got %s\n", account); + ok(use == SidTypeGroup, "expect SidTypeGroup, got %d\n", use); + ok(!strcmp(account, "None"), "expect None, got %s\n", account);
res = GetTokenInformation( token, TokenUser, NULL, 0, &size ); ok(!res, "Expected failure, got %d\n", res);
Is it possible it depends on whether you run on domain controller or client within domain?
Hi Nikolay,
On 19/9/19 3:52 pm, Nikolay Sivov wrote:
Is it possible it depends on whether you run on domain controller or client within domain?
Its possible but I don't have access to a Active Directory at the moment to test this.
Looking at the test.winehq.com, none of the advapi32:security are failing (except on windows 10).
Then again I don't know if any them are run in a Active Directory environment.
So, anybody got access to a Active Directory that is able to run the advapi32:security tests and post
the results?
Regards
Alistair.
Hi Alistair, thanks again for picking up my legacy patches, I really appreciate that a lot!
Hi Nikolay, thanks for the comment, my memory on the patch is not clear anymore, I can only remember I didn't test Active Directory at the time. And I also remember this patch is for Cygwin/Msys2. However, there is no trivial way to test recent Cygwin/Msys2 on recent Wine version because of multiple changes applied on Cygwin/Msys2 runtime: https://github.com/msys2/MSYS2-packages/issues/682
My knowledge of Wine / Win32 API is expired nowadays, I can't comment more, but I still enjoy reading Wine mailing list, thanks for the great work.