diff --git a/appl/ftp/ftpd/ftpd.c b/appl/ftp/ftpd/ftpd.c index b5bdb914e..65c5427b9 100644 --- a/appl/ftp/ftpd/ftpd.c +++ b/appl/ftp/ftpd/ftpd.c @@ -427,7 +427,7 @@ main(int argc, char **argv) (void) fclose(fd); /* reply(220,) must follow */ } - (void) gethostname(hostname, sizeof(hostname)); + k_gethostname(hostname, sizeof(hostname)); reply(220, "%s FTP server (%s) ready.", hostname, version); (void) setjmp(errcatch); for (;;) diff --git a/appl/popper/pop_init.c b/appl/popper/pop_init.c index 4b29cdf1f..f5449baed 100644 --- a/appl/popper/pop_init.c +++ b/appl/popper/pop_init.c @@ -89,7 +89,7 @@ pop_init(POP *p,int argcount,char **argmessage) p->myname = argmessage[0]; /* Get the name of our host */ - (void)gethostname(p->myhost,MaxHostNameLen); + k_gethostname(p->myhost,MaxHostNameLen); /* Open the log file */ #ifdef SYSLOG42 diff --git a/appl/telnet/libtelnet/krb4encpwd.c b/appl/telnet/libtelnet/krb4encpwd.c index d26930ca5..0de354d07 100644 --- a/appl/telnet/libtelnet/krb4encpwd.c +++ b/appl/telnet/libtelnet/krb4encpwd.c @@ -161,7 +161,7 @@ krb4encpwd_init(ap, server) str_data[3] = TELQUAL_REPLY; } else { str_data[3] = TELQUAL_IS; - gethostname(hostname, sizeof(hostname)); + k_gethostname(hostname, sizeof(hostname)); realm = krb_realmofhost(hostname); cp = strchr(hostname, '.'); if (*cp != NULL) *cp = NULL; @@ -212,7 +212,7 @@ krb4encpwd_is(ap, data, cnt) case KRB4_ENCPWD_AUTH: memmove((void *)auth.dat, (void *)data, auth.length = cnt); - gethostname(lhostname, sizeof(lhostname)); + k_gethostname(lhostname, sizeof(lhostname)); if ((cp = strchr(lhostname, '.')) != 0) *cp = '\0'; if (r = krb_rd_encpwd_req(&auth, KRB_SERVICE_NAME, lhostname, 0, &adat, NULL, challenge, r_user, r_passwd)) { @@ -304,7 +304,7 @@ krb4encpwd_reply(ap, data, cnt) * Verify that the response to the challenge is correct. */ - gethostname(hostname, sizeof(hostname)); + k_gethostname(hostname, sizeof(hostname)); realm = krb_realmofhost(hostname); memmove((void *)challenge, (void *)data, cnt); memset(user_passwd, 0, sizeof(user_passwd)); diff --git a/appl/telnet/libtelnet/rsaencpwd.c b/appl/telnet/libtelnet/rsaencpwd.c index d0a2ec63b..74b57ffc5 100644 --- a/appl/telnet/libtelnet/rsaencpwd.c +++ b/appl/telnet/libtelnet/rsaencpwd.c @@ -158,7 +158,7 @@ rsaencpwd_init(ap, server) if (server) { str_data[3] = TELQUAL_REPLY; memset(key_file, 0, sizeof(key_file)); - gethostname(lhostname, sizeof(lhostname)); + k_gethostname(lhostname, sizeof(lhostname)); if ((cp = strchr(lhostname, '.')) != 0) *cp = '\0'; strcpy(key_file, "/etc/."); strcat(key_file, lhostname); diff --git a/appl/telnet/libtelnet/spx.c b/appl/telnet/libtelnet/spx.c index fe55035d4..b5b9c32f0 100644 --- a/appl/telnet/libtelnet/spx.c +++ b/appl/telnet/libtelnet/spx.c @@ -170,7 +170,7 @@ spx_init(ap, server) if (server) { str_data[3] = TELQUAL_REPLY; - gethostname(lhostname, sizeof(lhostname)); + k_gethostname(lhostname, sizeof(lhostname)); strcpy(targ_printable, "SERVICE:rcmd@"); strcat(targ_printable, lhostname); input_name_buffer.length = strlen(targ_printable); @@ -320,7 +320,7 @@ spx_is(ap, data, cnt) input_token.length = cnt; input_token.value = (char *) data; - gethostname(lhostname, sizeof(lhostname)); + k_gethostname(lhostname, sizeof(lhostname)); strcpy(targ_printable, "SERVICE:rcmd@"); strcat(targ_printable, lhostname); diff --git a/appl/telnet/telnet/commands.c b/appl/telnet/telnet/commands.c index 962b3ac82..eabbc934d 100644 --- a/appl/telnet/telnet/commands.c +++ b/appl/telnet/telnet/commands.c @@ -1661,7 +1661,7 @@ env_init() char hbuf[256+1]; char *cp2 = strchr((char *)ep->value, ':'); - gethostname(hbuf, 256); + k_gethostname(hbuf, 256); hbuf[256] = '\0'; /* If this is not the full name, try to get it via DNS */ diff --git a/appl/telnet/telnet/telnet.c b/appl/telnet/telnet/telnet.c index 4d31d97c5..e97641483 100644 --- a/appl/telnet/telnet/telnet.c +++ b/appl/telnet/telnet/telnet.c @@ -2104,7 +2104,7 @@ telnet(user) static char local_host[256] = { 0 }; if (!local_host[0]) { - gethostname(local_host, sizeof(local_host)); + k_gethostname(local_host, sizeof(local_host)); local_host[sizeof(local_host)-1] = 0; } auth_encrypt_init(local_host, hostname, "TELNET", 0); diff --git a/appl/telnet/telnetd/telnetd.c b/appl/telnet/telnetd/telnetd.c index 5f7c56874..654cc490c 100644 --- a/appl/telnet/telnetd/telnetd.c +++ b/appl/telnet/telnetd/telnetd.c @@ -873,7 +873,7 @@ void doit(struct sockaddr_in *who) remote_host_name[sizeof(remote_host_name)-1] = 0; host = remote_host_name; - (void) gethostname(host_name, sizeof (host_name)); + (void) k_gethostname(host_name, sizeof (host_name)); hostname = host_name; #ifndef abs