summaryrefslogtreecommitdiff
path: root/ssh.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2013-10-17 11:48:13 +1100
committerDamien Miller <djm@mindrot.org>2013-10-17 11:48:13 +1100
commit3850559be93f1a442ae9ed370e8c389889dd5f72 (patch)
tree82dd3228fdd4140ad1d563275d6e2dbbda291c8d /ssh.c
parent607af3434b75acc7199a5d99d5a9c11068c01f27 (diff)
- djm@cvs.openbsd.org 2013/10/16 22:49:39
[readconf.c readconf.h ssh.1 ssh.c ssh_config.5] s/canonicalise/canonicalize/ for consistency with existing spelling, e.g. authorized_keys; pointed out by naddy@
Diffstat (limited to 'ssh.c')
-rw-r--r--ssh.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/ssh.c b/ssh.c
index 230591b3a..6581e57bf 100644
--- a/ssh.c
+++ b/ssh.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh.c,v 1.385 2013/10/16 02:31:46 djm Exp $ */ 1/* $OpenBSD: ssh.c,v 1.386 2013/10/16 22:49:39 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -275,14 +275,14 @@ check_follow_cname(char **namep, const char *cname)
275 if (*cname == '\0' || options.num_permitted_cnames == 0 || 275 if (*cname == '\0' || options.num_permitted_cnames == 0 ||
276 strcmp(*namep, cname) == 0) 276 strcmp(*namep, cname) == 0)
277 return 0; 277 return 0;
278 if (options.canonicalise_hostname == SSH_CANONICALISE_NO) 278 if (options.canonicalize_hostname == SSH_CANONICALISE_NO)
279 return 0; 279 return 0;
280 /* 280 /*
281 * Don't attempt to canonicalise names that will be interpreted by 281 * Don't attempt to canonicalize names that will be interpreted by
282 * a proxy unless the user specifically requests so. 282 * a proxy unless the user specifically requests so.
283 */ 283 */
284 if (options.proxy_command != NULL && 284 if (options.proxy_command != NULL &&
285 options.canonicalise_hostname != SSH_CANONICALISE_ALWAYS) 285 options.canonicalize_hostname != SSH_CANONICALISE_ALWAYS)
286 return 0; 286 return 0;
287 debug3("%s: check \"%s\" CNAME \"%s\"", __func__, *namep, cname); 287 debug3("%s: check \"%s\" CNAME \"%s\"", __func__, *namep, cname);
288 for (i = 0; i < options.num_permitted_cnames; i++) { 288 for (i = 0; i < options.num_permitted_cnames; i++) {
@@ -292,7 +292,7 @@ check_follow_cname(char **namep, const char *cname)
292 match_pattern_list(cname, rule->target_list, 292 match_pattern_list(cname, rule->target_list,
293 strlen(rule->target_list), 1) != 1) 293 strlen(rule->target_list), 1) != 1)
294 continue; 294 continue;
295 verbose("Canonicalised DNS aliased hostname " 295 verbose("Canonicalized DNS aliased hostname "
296 "\"%s\" => \"%s\"", *namep, cname); 296 "\"%s\" => \"%s\"", *namep, cname);
297 free(*namep); 297 free(*namep);
298 *namep = xstrdup(cname); 298 *namep = xstrdup(cname);
@@ -307,20 +307,20 @@ check_follow_cname(char **namep, const char *cname)
307 * if no name was found after canonicalisation. 307 * if no name was found after canonicalisation.
308 */ 308 */
309static struct addrinfo * 309static struct addrinfo *
310resolve_canonicalise(char **hostp, u_int port) 310resolve_canonicalize(char **hostp, u_int port)
311{ 311{
312 int i, ndots; 312 int i, ndots;
313 char *cp, *fullhost, cname_target[NI_MAXHOST]; 313 char *cp, *fullhost, cname_target[NI_MAXHOST];
314 struct addrinfo *addrs; 314 struct addrinfo *addrs;
315 315
316 if (options.canonicalise_hostname == SSH_CANONICALISE_NO) 316 if (options.canonicalize_hostname == SSH_CANONICALISE_NO)
317 return NULL; 317 return NULL;
318 /* 318 /*
319 * Don't attempt to canonicalise names that will be interpreted by 319 * Don't attempt to canonicalize names that will be interpreted by
320 * a proxy unless the user specifically requests so. 320 * a proxy unless the user specifically requests so.
321 */ 321 */
322 if (options.proxy_command != NULL && 322 if (options.proxy_command != NULL &&
323 options.canonicalise_hostname != SSH_CANONICALISE_ALWAYS) 323 options.canonicalize_hostname != SSH_CANONICALISE_ALWAYS)
324 return NULL; 324 return NULL;
325 /* Don't apply canonicalisation to sufficiently-qualified hostnames */ 325 /* Don't apply canonicalisation to sufficiently-qualified hostnames */
326 ndots = 0; 326 ndots = 0;
@@ -328,9 +328,9 @@ resolve_canonicalise(char **hostp, u_int port)
328 if (*cp == '.') 328 if (*cp == '.')
329 ndots++; 329 ndots++;
330 } 330 }
331 if (ndots > options.canonicalise_max_dots) { 331 if (ndots > options.canonicalize_max_dots) {
332 debug3("%s: not canonicalising hostname \"%s\" (max dots %d)", 332 debug3("%s: not canonicalizing hostname \"%s\" (max dots %d)",
333 __func__, *hostp, options.canonicalise_max_dots); 333 __func__, *hostp, options.canonicalize_max_dots);
334 return NULL; 334 return NULL;
335 } 335 }
336 /* Attempt each supplied suffix */ 336 /* Attempt each supplied suffix */
@@ -347,14 +347,14 @@ resolve_canonicalise(char **hostp, u_int port)
347 fullhost[strlen(fullhost) - 1] = '\0'; 347 fullhost[strlen(fullhost) - 1] = '\0';
348 /* Follow CNAME if requested */ 348 /* Follow CNAME if requested */
349 if (!check_follow_cname(&fullhost, cname_target)) { 349 if (!check_follow_cname(&fullhost, cname_target)) {
350 debug("Canonicalised hostname \"%s\" => \"%s\"", 350 debug("Canonicalized hostname \"%s\" => \"%s\"",
351 *hostp, fullhost); 351 *hostp, fullhost);
352 } 352 }
353 free(*hostp); 353 free(*hostp);
354 *hostp = fullhost; 354 *hostp = fullhost;
355 return addrs; 355 return addrs;
356 } 356 }
357 if (!options.canonicalise_fallback_local) 357 if (!options.canonicalize_fallback_local)
358 fatal("%s: Could not resolve host \"%s\"", __progname, host); 358 fatal("%s: Could not resolve host \"%s\"", __progname, host);
359 return NULL; 359 return NULL;
360} 360}
@@ -907,8 +907,8 @@ main(int ac, char **av)
907 } 907 }
908 908
909 /* If canonicalisation requested then try to apply it */ 909 /* If canonicalisation requested then try to apply it */
910 if (options.canonicalise_hostname != SSH_CANONICALISE_NO) 910 if (options.canonicalize_hostname != SSH_CANONICALISE_NO)
911 addrs = resolve_canonicalise(&host, options.port); 911 addrs = resolve_canonicalize(&host, options.port);
912 /* 912 /*
913 * If canonicalisation not requested, or if it failed then try to 913 * If canonicalisation not requested, or if it failed then try to
914 * resolve the bare hostname name using the system resolver's usual 914 * resolve the bare hostname name using the system resolver's usual