From f8efc42f666a09de838d930a167ea32e81d899e0 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 11 Feb 2014 17:45:09 +0000 Subject: [PATCH] * ldap.cc (rediscover_thread): Give argument a useful name. * miscfuncs.cc (NT_readline::init): It's a really bad idea trying to print a pointer to a PUNICODE_STRING as PUNICODE_STRING. Fix it. * uinfo.cc (cygheap_domain_info::init): Print status codes as hex values in debug output. --- winsup/cygwin/ChangeLog | 8 ++++++++ winsup/cygwin/ldap.cc | 6 +++--- winsup/cygwin/miscfuncs.cc | 2 +- winsup/cygwin/uinfo.cc | 4 ++-- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index c79a62684..6aacffaba 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,11 @@ +2014-02-11 Corinna Vinschen + + * ldap.cc (rediscover_thread): Give argument a useful name. + * miscfuncs.cc (NT_readline::init): It's a really bad idea trying to + print a pointer to a PUNICODE_STRING as PUNICODE_STRING. Fix it. + * uinfo.cc (cygheap_domain_info::init): Print status codes as hex + values in debug output. + 2014-02-11 Corinna Vinschen * autoload.cc (NetLocalGroupGetInfo): Replace NetGroupGetInfo. diff --git a/winsup/cygwin/ldap.cc b/winsup/cygwin/ldap.cc index de09aa2f6..66a7dbb76 100644 --- a/winsup/cygwin/ldap.cc +++ b/winsup/cygwin/ldap.cc @@ -73,15 +73,15 @@ PWCHAR rfc2307_gid_attr[] = }; DWORD WINAPI -rediscover_thread (LPVOID dummy) +rediscover_thread (LPVOID domain) { PDOMAIN_CONTROLLER_INFOW pdci; - DWORD ret = DsGetDcNameW (NULL, (PWCHAR) dummy, NULL, NULL, + DWORD ret = DsGetDcNameW (NULL, (PWCHAR) domain, NULL, NULL, DS_FORCE_REDISCOVERY | DS_ONLY_LDAP_NEEDED, &pdci); if (ret == ERROR_SUCCESS) NetApiBufferFree (pdci); else - debug_printf ("DsGetDcNameW(%W) failed with error %u", dummy, ret); + debug_printf ("DsGetDcNameW(%W) failed with error %u", domain, ret); return 0; } diff --git a/winsup/cygwin/miscfuncs.cc b/winsup/cygwin/miscfuncs.cc index 241819460..20a2ef659 100644 --- a/winsup/cygwin/miscfuncs.cc +++ b/winsup/cygwin/miscfuncs.cc @@ -397,7 +397,7 @@ NT_readline::init (POBJECT_ATTRIBUTES attr, PCHAR in_buf, ULONG in_buflen) if (!NT_SUCCESS (status)) { paranoid_printf ("NtOpenFile(%S) failed, status %y", - &attr->ObjectName, status); + attr->ObjectName, status); return false; } buf = in_buf; diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc index 2bf10ac7f..38e222d92 100644 --- a/winsup/cygwin/uinfo.cc +++ b/winsup/cygwin/uinfo.cc @@ -726,7 +726,7 @@ cygheap_domain_info::init () (PVOID *) &pdom); if (status != STATUS_SUCCESS) { - system_printf ("LsaQueryInformationPolicy(Primary) %u", status); + system_printf ("LsaQueryInformationPolicy(Primary) %y", status); return false; } /* Copy primary domain info to cygheap. */ @@ -740,7 +740,7 @@ cygheap_domain_info::init () (PVOID *) &adom); if (status != STATUS_SUCCESS) { - system_printf ("LsaQueryInformationPolicy(Account) %u", status); + system_printf ("LsaQueryInformationPolicy(Account) %y", status); return false; } /* Copy account domain info to cygheap. If we're running on a DC the account