Commit 5f1b91e5 authored by Vitaly Lipatov's avatar Vitaly Lipatov Committed by Alexandre Julliard

secur32: Print name for EXTENDED_NAME_FORMAT argument.

parent d5a983eb
...@@ -816,6 +816,33 @@ SECURITY_STATUS WINAPI EnumerateSecurityPackagesA(PULONG pcPackages, ...@@ -816,6 +816,33 @@ SECURITY_STATUS WINAPI EnumerateSecurityPackagesA(PULONG pcPackages,
return ret; return ret;
} }
static const char *debugstr_NameFormat( EXTENDED_NAME_FORMAT format )
{
static const char * const names[] =
{
"NameUnknown",
"NameFullyQualifiedDN",
"NameSamCompatible",
"NameDisplay",
NULL,
NULL,
"NameUniqueId",
"NameCanonical",
"NameUserPrincipal",
"NameCanonicalEx",
"NameServicePrincipal",
NULL,
"NameDnsDomain",
"NameGivenName",
"NameSurname"
};
if (format < ARRAY_SIZE(names) && names[format]) return names[format];
return wine_dbg_sprintf( "%u", format );
}
/*********************************************************************** /***********************************************************************
* GetComputerObjectNameA (SECUR32.@) * GetComputerObjectNameA (SECUR32.@)
* *
...@@ -847,7 +874,7 @@ BOOLEAN WINAPI GetComputerObjectNameA( ...@@ -847,7 +874,7 @@ BOOLEAN WINAPI GetComputerObjectNameA(
LPWSTR bufferW = NULL; LPWSTR bufferW = NULL;
ULONG sizeW = *nSize; ULONG sizeW = *nSize;
TRACE("(%d %p %p)\n", NameFormat, lpNameBuffer, nSize); TRACE("(%s %p %p)\n", debugstr_NameFormat(NameFormat), lpNameBuffer, nSize);
if (lpNameBuffer) { if (lpNameBuffer) {
if (!(bufferW = malloc(sizeW * sizeof(WCHAR)))) { if (!(bufferW = malloc(sizeW * sizeof(WCHAR)))) {
...@@ -879,7 +906,7 @@ BOOLEAN WINAPI GetComputerObjectNameW( ...@@ -879,7 +906,7 @@ BOOLEAN WINAPI GetComputerObjectNameW(
NTSTATUS ntStatus; NTSTATUS ntStatus;
BOOLEAN status; BOOLEAN status;
TRACE("(%d %p %p)\n", NameFormat, lpNameBuffer, nSize); TRACE("(%s %p %p)\n", debugstr_NameFormat(NameFormat), lpNameBuffer, nSize);
if (NameFormat == NameUnknown) if (NameFormat == NameUnknown)
{ {
...@@ -1066,7 +1093,7 @@ BOOLEAN WINAPI GetUserNameExA( ...@@ -1066,7 +1093,7 @@ BOOLEAN WINAPI GetUserNameExA(
BOOLEAN rc; BOOLEAN rc;
LPWSTR bufferW = NULL; LPWSTR bufferW = NULL;
ULONG sizeW = *nSize; ULONG sizeW = *nSize;
TRACE("(%d %p %p)\n", NameFormat, lpNameBuffer, nSize); TRACE("(%s %p %p)\n", debugstr_NameFormat(NameFormat), lpNameBuffer, nSize);
if (lpNameBuffer) { if (lpNameBuffer) {
bufferW = malloc(sizeW * sizeof(WCHAR)); bufferW = malloc(sizeW * sizeof(WCHAR));
if (bufferW == NULL) { if (bufferW == NULL) {
...@@ -1098,7 +1125,7 @@ BOOLEAN WINAPI GetUserNameExA( ...@@ -1098,7 +1125,7 @@ BOOLEAN WINAPI GetUserNameExA(
BOOLEAN WINAPI GetUserNameExW( BOOLEAN WINAPI GetUserNameExW(
EXTENDED_NAME_FORMAT NameFormat, LPWSTR lpNameBuffer, PULONG nSize) EXTENDED_NAME_FORMAT NameFormat, LPWSTR lpNameBuffer, PULONG nSize)
{ {
TRACE("(%d %p %p)\n", NameFormat, lpNameBuffer, nSize); TRACE("(%s %p %p)\n", debugstr_NameFormat(NameFormat), lpNameBuffer, nSize);
switch (NameFormat) switch (NameFormat)
{ {
...@@ -1155,8 +1182,8 @@ BOOLEAN WINAPI TranslateNameA( ...@@ -1155,8 +1182,8 @@ BOOLEAN WINAPI TranslateNameA(
EXTENDED_NAME_FORMAT DesiredNameFormat, LPSTR lpTranslatedName, EXTENDED_NAME_FORMAT DesiredNameFormat, LPSTR lpTranslatedName,
PULONG nSize) PULONG nSize)
{ {
FIXME("%p %d %d %p %p\n", lpAccountName, AccountNameFormat, FIXME("%p %s %s %p %p\n", lpAccountName, debugstr_NameFormat(AccountNameFormat),
DesiredNameFormat, lpTranslatedName, nSize); debugstr_NameFormat(DesiredNameFormat), lpTranslatedName, nSize);
return FALSE; return FALSE;
} }
...@@ -1165,8 +1192,8 @@ BOOLEAN WINAPI TranslateNameW( ...@@ -1165,8 +1192,8 @@ BOOLEAN WINAPI TranslateNameW(
EXTENDED_NAME_FORMAT DesiredNameFormat, LPWSTR lpTranslatedName, EXTENDED_NAME_FORMAT DesiredNameFormat, LPWSTR lpTranslatedName,
PULONG nSize) PULONG nSize)
{ {
FIXME("%p %d %d %p %p\n", lpAccountName, AccountNameFormat, FIXME("%p %s %s %p %p\n", lpAccountName, debugstr_NameFormat(AccountNameFormat),
DesiredNameFormat, lpTranslatedName, nSize); debugstr_NameFormat(DesiredNameFormat), lpTranslatedName, nSize);
return FALSE; return FALSE;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment