* net.cc (getdomainname): Drop special case for NT4.
This commit is contained in:
parent
2a9b4b7aa0
commit
9d86e31826
@ -1,3 +1,7 @@
|
|||||||
|
2010-09-28 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* net.cc (getdomainname): Drop special case for NT4.
|
||||||
|
|
||||||
2010-09-28 Corinna Vinschen <corinna@vinschen.de>
|
2010-09-28 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
Revert accidental previous login.
|
Revert accidental previous login.
|
||||||
|
@ -1467,22 +1467,6 @@ getdomainname (char *domain, size_t len)
|
|||||||
strncpy(domain, info->DomainName, len);
|
strncpy(domain, info->DomainName, len);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This is only used by NT4.
|
|
||||||
The registry names are language independent. */
|
|
||||||
reg_key r (HKEY_LOCAL_MACHINE, KEY_READ,
|
|
||||||
"SYSTEM", "CurrentControlSet", "Services",
|
|
||||||
"Tcpip", "Parameters", NULL);
|
|
||||||
|
|
||||||
if (!r.error ())
|
|
||||||
{
|
|
||||||
int res1, res2 = 0; /* Suppress compiler warning */
|
|
||||||
res1 = r.get_string ("Domain", domain, len, "");
|
|
||||||
if (res1 != ERROR_SUCCESS || !domain[0])
|
|
||||||
res2 = r.get_string ("DhcpDomain", domain, len, "");
|
|
||||||
if (res1 == ERROR_SUCCESS || res2 == ERROR_SUCCESS)
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
__seterrno ();
|
__seterrno ();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user