version 1.125, 2002/06/19 00:27:55 |
version 1.126, 2002/06/23 03:30:17 |
|
|
memset(&hints, 0, sizeof(hints)); |
memset(&hints, 0, sizeof(hints)); |
hints.ai_family = family; |
hints.ai_family = family; |
hints.ai_socktype = SOCK_STREAM; |
hints.ai_socktype = SOCK_STREAM; |
snprintf(strport, sizeof strport, "%d", port); |
snprintf(strport, sizeof strport, "%u", port); |
if ((gaierr = getaddrinfo(host, strport, &hints, &aitop)) != 0) |
if ((gaierr = getaddrinfo(host, strport, &hints, &aitop)) != 0) |
fatal("%s: %.100s: %s", __progname, host, |
fatal("%s: %.100s: %s", __progname, host, |
gai_strerror(gaierr)); |
gai_strerror(gaierr)); |
|
|
* check whether the supplied host key is valid, return -1 if the key |
* check whether the supplied host key is valid, return -1 if the key |
* is not valid. the user_hostfile will not be updated if 'readonly' is true. |
* is not valid. the user_hostfile will not be updated if 'readonly' is true. |
*/ |
*/ |
|
|
static int |
static int |
check_host_key(char *host, struct sockaddr *hostaddr, Key *host_key, |
check_host_key(char *host, struct sockaddr *hostaddr, Key *host_key, |
int readonly, const char *user_hostfile, const char *system_hostfile) |
int readonly, const char *user_hostfile, const char *system_hostfile) |