-- v10: secur32: Print also text name for EXTENDED_NAME_FORMAT argument. advapi32: Print also text name for POLICY_INFORMATION_CLASS argument.
From: Vitaly Lipatov lav@etersoft.ru
--- dlls/advapi32/lsa.c | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-)
diff --git a/dlls/advapi32/lsa.c b/dlls/advapi32/lsa.c index b63519c0299..66a15420f90 100644 --- a/dlls/advapi32/lsa.c +++ b/dlls/advapi32/lsa.c @@ -62,6 +62,35 @@ static void dumpLsaAttributes(const LSA_OBJECT_ATTRIBUTES *oa) } }
+static LPCSTR string_InformationClass[] = +{ + "(null)", + "PolicyAuditLogInformation", + "PolicyAuditEventsInformation", + "PolicyPrimaryDomainInformation", + "PolicyPdAccountInformation", + "PolicyAccountDomainInformation", + "PolicyLsaServerRoleInformation", + "PolicyReplicaSourceInformation", + "PolicyDefaultQuotaInformation", + "PolicyModificationInformation", + "PolicyAuditFullSetInformation", + "PolicyAuditFullQueryInformation", + "PolicyDnsDomainInformation", + "PolicyDnsDomainInformationInt", + "PolicyLocalAccountDomainInformation", + "PolicyMachineAccountInformation", + "PolicyMachineAccountInformation2", + "PolicyLastEntry" +}; + +static LPCSTR debugstr_InformationClass(IN POLICY_INFORMATION_CLASS InformationClass) +{ + if (InformationClass >= ARRAY_SIZE(string_InformationClass)) + return "(unknown)"; + return string_InformationClass[InformationClass]; +} + static void* ADVAPI_GetDomainName(unsigned sz, unsigned ofs) { HKEY key; @@ -779,7 +808,7 @@ NTSTATUS WINAPI LsaQueryInformationPolicy( IN POLICY_INFORMATION_CLASS InformationClass, OUT PVOID *Buffer) { - TRACE("(%p,0x%08x,%p)\n", PolicyHandle, InformationClass, Buffer); + TRACE("(%p,%s(0x%08x),%p)\n", PolicyHandle, debugstr_InformationClass(InformationClass), InformationClass, Buffer);
if(!Buffer) return STATUS_INVALID_PARAMETER; switch (InformationClass) @@ -1016,7 +1045,7 @@ NTSTATUS WINAPI LsaSetInformationPolicy( IN POLICY_INFORMATION_CLASS InformationClass, IN PVOID Buffer) { - FIXME("(%p,0x%08x,%p) stub\n", PolicyHandle, InformationClass, Buffer); + FIXME("(%p,%s(0x%08x),%p) stub\n", PolicyHandle, debugstr_InformationClass(InformationClass), InformationClass, Buffer);
return STATUS_UNSUCCESSFUL; }
From: Vitaly Lipatov lav@etersoft.ru
--- dlls/secur32/secur32.c | 44 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 8 deletions(-)
diff --git a/dlls/secur32/secur32.c b/dlls/secur32/secur32.c index 46a80c9a76c..5d067bf8ff8 100644 --- a/dlls/secur32/secur32.c +++ b/dlls/secur32/secur32.c @@ -816,6 +816,34 @@ SECURITY_STATUS WINAPI EnumerateSecurityPackagesA(PULONG pcPackages, return ret; }
+ +static LPCSTR string_NameFormat[] = +{ + "NameUnknown", + "NameFullyQualifiedDN", + "NameSamCompatible", + "NameDisplay", + "(unknown)", + "(unknown)", + "NameUniqueId", + "NameCanonical", + "NameUserPrincipal", + "NameCanonicalEx", + "NameServicePrincipal", + "(unknown)", + "NameDnsDomain", + "NameGivenName", + "NameSurname" +}; + +static LPCSTR debugstr_NameFormat(IN EXTENDED_NAME_FORMAT NameFormat) +{ + if (NameFormat >= ARRAY_SIZE(string_NameFormat)) + return "(unknown)"; + return string_NameFormat[NameFormat]; +} + + /*********************************************************************** * GetComputerObjectNameA (SECUR32.@) * @@ -847,7 +875,7 @@ BOOLEAN WINAPI GetComputerObjectNameA( LPWSTR bufferW = NULL; ULONG sizeW = *nSize;
- TRACE("(%d %p %p)\n", NameFormat, lpNameBuffer, nSize); + TRACE("(%s(%d) %p %p)\n", debugstr_NameFormat(NameFormat), NameFormat, lpNameBuffer, nSize);
if (lpNameBuffer) { if (!(bufferW = malloc(sizeW * sizeof(WCHAR)))) { @@ -879,7 +907,7 @@ BOOLEAN WINAPI GetComputerObjectNameW( NTSTATUS ntStatus; BOOLEAN status;
- TRACE("(%d %p %p)\n", NameFormat, lpNameBuffer, nSize); + TRACE("(%s(%d) %p %p)\n", debugstr_NameFormat(NameFormat), NameFormat, lpNameBuffer, nSize);
if (NameFormat == NameUnknown) { @@ -1066,7 +1094,7 @@ BOOLEAN WINAPI GetUserNameExA( BOOLEAN rc; LPWSTR bufferW = NULL; ULONG sizeW = *nSize; - TRACE("(%d %p %p)\n", NameFormat, lpNameBuffer, nSize); + TRACE("(%s(%d) %p %p)\n", debugstr_NameFormat(NameFormat), NameFormat, lpNameBuffer, nSize); if (lpNameBuffer) { bufferW = malloc(sizeW * sizeof(WCHAR)); if (bufferW == NULL) { @@ -1098,7 +1126,7 @@ BOOLEAN WINAPI GetUserNameExA( BOOLEAN WINAPI GetUserNameExW( EXTENDED_NAME_FORMAT NameFormat, LPWSTR lpNameBuffer, PULONG nSize) { - TRACE("(%d %p %p)\n", NameFormat, lpNameBuffer, nSize); + TRACE("(%s(%d) %p %p)\n", debugstr_NameFormat(NameFormat), NameFormat, lpNameBuffer, nSize);
switch (NameFormat) { @@ -1154,8 +1182,8 @@ BOOLEAN WINAPI TranslateNameA( EXTENDED_NAME_FORMAT DesiredNameFormat, LPSTR lpTranslatedName, PULONG nSize) { - FIXME("%p %d %d %p %p\n", lpAccountName, AccountNameFormat, - DesiredNameFormat, lpTranslatedName, nSize); + FIXME("%p %s(%d) %s(%d) %p %p\n", lpAccountName, debugstr_NameFormat(AccountNameFormat), AccountNameFormat, + debugstr_NameFormat(DesiredNameFormat), DesiredNameFormat, lpTranslatedName, nSize); return FALSE; }
@@ -1164,8 +1192,8 @@ BOOLEAN WINAPI TranslateNameW( EXTENDED_NAME_FORMAT DesiredNameFormat, LPWSTR lpTranslatedName, PULONG nSize) { - FIXME("%p %d %d %p %p\n", lpAccountName, AccountNameFormat, - DesiredNameFormat, lpTranslatedName, nSize); + FIXME("%p %s(%d) %s(%d) %p %p\n", lpAccountName, debugstr_NameFormat(AccountNameFormat), AccountNameFormat, + debugstr_NameFormat(DesiredNameFormat), DesiredNameFormat, lpTranslatedName, nSize); return FALSE; }
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=136142
Your paranoid android.
=== debian11b (64 bit WoW report) ===
ntdll: exception.c:3256: Test failed: B0 flag is not set in Dr6 exception.c:3257: Test failed: BS flag is set in Dr6