[0.4.10] [NFSD] Apply a hack to avoid CORE-13498

Committing into rls was requested by Pierre.
The hack allows to startup nfsd even when getnameinfo() fails.
My personal release-tests will not cover NFSD.

like in last release
(cherry picked from commit 39f5e56a29)
This commit is contained in:
Joachim Henze 2018-06-02 13:23:06 +02:00
parent f1e80fe6f4
commit 5340d9d065

View file

@ -333,8 +333,17 @@ static int getdomainname()
(socklen_t)ptr->ai_addrlen, hostname, NI_MAXHOST,
servInfo, NI_MAXSERV, NI_NAMEREQD);
if (status)
#if 0
dprintf(1, "getnameinfo failed %d\n", WSAGetLastError());
else {
#else
{
dprintf(1, "getnameinfo failed %d, forcing name\n", WSAGetLastError());
memcpy(hostname, "reactos.home", sizeof("reactos.home"));
status = 0;
}
{
#endif
size_t i, len = strlen(hostname);
char *p = hostname;
dprintf(1, "getdomainname: hostname %s %d\n", hostname, len);