* security.cc (get_lsa_srv_inf): Prevent extraneous backslashes for
the NT Domain case.
This commit is contained in:
parent
271938959c
commit
9b15f5fa95
|
@ -1,3 +1,8 @@
|
|||
Wed Apr 17 11:27:04 2002 Jason Tishler <jason@tishler.net>
|
||||
|
||||
* security.cc (get_lsa_srv_inf): Prevent extraneous backslashes for
|
||||
the NT Domain case.
|
||||
|
||||
2002-04-12 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* net.cc (cygwin_accept): Set socket type for accepted socket.
|
||||
|
|
|
@ -230,19 +230,20 @@ get_lsa_srv_inf (LSA_HANDLE lsa, char *logonserver, char *domain)
|
|||
(ret = NetGetDCName(NULL, primary, (LPBYTE *) &buf)) == STATUS_SUCCESS)
|
||||
{
|
||||
sys_wcstombs (name, buf, INTERNET_MAX_HOST_NAME_LENGTH + 1);
|
||||
strcpy (logonserver, name);
|
||||
if (domain)
|
||||
sys_wcstombs (domain, primary, INTERNET_MAX_HOST_NAME_LENGTH + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
sys_wcstombs (name, account, INTERNET_MAX_HOST_NAME_LENGTH + 1);
|
||||
strcpy (logonserver, "\\\\");
|
||||
strcat (logonserver, name);
|
||||
if (domain)
|
||||
sys_wcstombs (domain, account, INTERNET_MAX_HOST_NAME_LENGTH + 1);
|
||||
}
|
||||
if (ret == STATUS_SUCCESS)
|
||||
NetApiBufferFree (buf);
|
||||
strcpy (logonserver, "\\\\");
|
||||
strcat (logonserver, name);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue