summaryrefslogtreecommitdiffstats
path: root/canohost.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2002-02-05 12:13:41 +1100
committerDamien Miller <djm@mindrot.org>2002-02-05 12:13:41 +1100
commitc5d8635d6a9425289bd0cbfa83b90a4e42e6a72a (patch)
tree9a431368be8d4ee5e8742c44870b34a3dfd457f7 /canohost.c
parent43cba34b649a2df8c170e17a5655d060830a386e (diff)
- markus@cvs.openbsd.org 2002/01/29 14:32:03
[auth2.c auth.c auth-options.c auth-rhosts.c auth-rh-rsa.c canohost.c servconf.c servconf.h session.c sshd.8 sshd_config] s/ReverseMappingCheck/VerifyReverseMapping/ and avoid confusion; ok stevesk@
Diffstat (limited to 'canohost.c')
-rw-r--r--canohost.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/canohost.c b/canohost.c
index 4f2e576b..5eb67f67 100644
--- a/canohost.c
+++ b/canohost.c
@@ -12,7 +12,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: canohost.c,v 1.29 2001/12/19 07:18:56 deraadt Exp $");
+RCSID("$OpenBSD: canohost.c,v 1.30 2002/01/29 14:32:03 markus Exp $");
#include "packet.h"
#include "xmalloc.h"
@@ -27,7 +27,7 @@ static void check_ip_options(int, char *);
*/
static char *
-get_remote_hostname(int socket, int reverse_mapping_check)
+get_remote_hostname(int socket, int verify_reverse_mapping)
{
struct sockaddr_storage from;
int i;
@@ -90,7 +90,7 @@ get_remote_hostname(int socket, int reverse_mapping_check)
if (isupper(name[i]))
name[i] = tolower(name[i]);
- if (!reverse_mapping_check)
+ if (!verify_reverse_mapping)
return xstrdup(name);
/*
* Map it back to an IP address and check that the given
@@ -174,14 +174,14 @@ check_ip_options(int socket, char *ipaddr)
*/
const char *
-get_canonical_hostname(int reverse_mapping_check)
+get_canonical_hostname(int verify_reverse_mapping)
{
static char *canonical_host_name = NULL;
- static int reverse_mapping_checked = 0;
+ static int verify_reverse_mapping_done = 0;
/* Check if we have previously retrieved name with same option. */
if (canonical_host_name != NULL) {
- if (reverse_mapping_checked != reverse_mapping_check)
+ if (verify_reverse_mapping_done != verify_reverse_mapping)
xfree(canonical_host_name);
else
return canonical_host_name;
@@ -190,11 +190,11 @@ get_canonical_hostname(int reverse_mapping_check)
/* Get the real hostname if socket; otherwise return UNKNOWN. */
if (packet_connection_is_on_socket())
canonical_host_name = get_remote_hostname(
- packet_get_connection_in(), reverse_mapping_check);
+ packet_get_connection_in(), verify_reverse_mapping);
else
canonical_host_name = xstrdup("UNKNOWN");
- reverse_mapping_checked = reverse_mapping_check;
+ verify_reverse_mapping_done = verify_reverse_mapping;
return canonical_host_name;
}
@@ -281,11 +281,11 @@ get_remote_ipaddr(void)
}
const char *
-get_remote_name_or_ip(u_int utmp_len, int reverse_mapping_check)
+get_remote_name_or_ip(u_int utmp_len, int verify_reverse_mapping)
{
static const char *remote = "";
if (utmp_len > 0)
- remote = get_canonical_hostname(reverse_mapping_check);
+ remote = get_canonical_hostname(verify_reverse_mapping);
if (utmp_len == 0 || strlen(remote) > utmp_len)
remote = get_remote_ipaddr();
return remote;