Projects
Eulaceura:Mainline:GA
telnet
_service:obs_scm:netkit-telnet-0.17-nodns.patch
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:netkit-telnet-0.17-nodns.patch of Package telnet
--- netkit-telnet-0.17.orig/telnetd/telnetd.c 2007-03-13 16:31:20.000000000 +0000 +++ netkit-telnet-0.17.orig/telnetd/telnetd.c 2007-03-13 16:31:26.000000000 +0000 @@ -653,6 +653,11 @@ doit(struct sockaddr *who, socklen_t who error = getnameinfo(who, wholen, namebuf, sizeof(namebuf), NULL, 0, 0); + /* if we can't get a hostname now, settle for an address */ + if(error == EAI_AGAIN) + error = getnameinfo(who, wholen, namebuf, sizeof(namebuf), + NULL, 0, NI_NUMERICHOST); + if (error) { perror("getnameinfo: localhost"); perror(gai_strerror(error)); @@ -681,7 +686,7 @@ doit(struct sockaddr *who, socklen_t who /* Get local host name */ { struct addrinfo hints; - struct addrinfo *res; + struct addrinfo *res = 0; int e; memset(&hints, '\0', sizeof(hints)); @@ -690,11 +695,14 @@ doit(struct sockaddr *who, socklen_t who gethostname(host_name, sizeof(host_name)); if ((e = getaddrinfo(host_name, NULL, &hints, &res)) != 0) { - perror("getaddrinfo: localhost"); - perror(gai_strerror(e)); - exit(1); + if(e != EAI_AGAIN) { + fprintf(stderr, "getaddrinfo: localhost %s\n", + gai_strerror(e)); + exit(1); + } } - freeaddrinfo(res); + if(res) + freeaddrinfo(res); } #if defined(AUTHENTICATE) || defined(ENCRYPT)
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2