- 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@
This commit is contained in:
Damien Miller 2013-10-17 11:48:13 +11:00
parent 607af3434b
commit 3850559be9
6 changed files with 66 additions and 62 deletions

View File

@ -16,6 +16,10 @@
- jmc@cvs.openbsd.org 2013/10/16 06:42:25
[ssh_config.5]
tweak previous;
- 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@
20131015
- (djm) OpenBSD CVS Sync

View File

@ -1,4 +1,4 @@
/* $OpenBSD: readconf.c,v 1.208 2013/10/16 02:31:45 djm Exp $ */
/* $OpenBSD: readconf.c,v 1.209 2013/10/16 22:49:38 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@ -144,8 +144,8 @@ typedef enum {
oTunnel, oTunnelDevice, oLocalCommand, oPermitLocalCommand,
oVisualHostKey, oUseRoaming, oZeroKnowledgePasswordAuthentication,
oKexAlgorithms, oIPQoS, oRequestTTY, oIgnoreUnknown, oProxyUseFdpass,
oCanonicalDomains, oCanonicaliseHostname, oCanonicaliseMaxDots,
oCanonicaliseFallbackLocal, oCanonicalisePermittedCNAMEs,
oCanonicalDomains, oCanonicalizeHostname, oCanonicalizeMaxDots,
oCanonicalizeFallbackLocal, oCanonicalizePermittedCNAMEs,
oIgnoredUnknownOption, oDeprecated, oUnsupported
} OpCodes;
@ -260,10 +260,10 @@ static struct {
{ "requesttty", oRequestTTY },
{ "proxyusefdpass", oProxyUseFdpass },
{ "canonicaldomains", oCanonicalDomains },
{ "canonicalisefallbacklocal", oCanonicaliseFallbackLocal },
{ "canonicalisehostname", oCanonicaliseHostname },
{ "canonicalisemaxdots", oCanonicaliseMaxDots },
{ "canonicalisepermittedcnames", oCanonicalisePermittedCNAMEs },
{ "canonicalizefallbacklocal", oCanonicalizeFallbackLocal },
{ "canonicalizehostname", oCanonicalizeHostname },
{ "canonicalizemaxdots", oCanonicalizeMaxDots },
{ "canonicalizepermittedcnames", oCanonicalizePermittedCNAMEs },
{ "ignoreunknown", oIgnoreUnknown },
{ NULL, oBadOption }
@ -644,7 +644,7 @@ static const struct multistate multistate_requesttty[] = {
{ "auto", REQUEST_TTY_AUTO },
{ NULL, -1 }
};
static const struct multistate multistate_canonicalisehostname[] = {
static const struct multistate multistate_canonicalizehostname[] = {
{ "true", SSH_CANONICALISE_YES },
{ "false", SSH_CANONICALISE_NO },
{ "yes", SSH_CANONICALISE_YES },
@ -1321,7 +1321,7 @@ parse_int:
}
break;
case oCanonicalisePermittedCNAMEs:
case oCanonicalizePermittedCNAMEs:
value = options->num_permitted_cnames != 0;
while ((arg = strdelim(&s)) != NULL && *arg != '\0') {
/* Either '*' for everything or 'list:list' */
@ -1350,17 +1350,17 @@ parse_int:
}
break;
case oCanonicaliseHostname:
intptr = &options->canonicalise_hostname;
multistate_ptr = multistate_canonicalisehostname;
case oCanonicalizeHostname:
intptr = &options->canonicalize_hostname;
multistate_ptr = multistate_canonicalizehostname;
goto parse_multistate;
case oCanonicaliseMaxDots:
intptr = &options->canonicalise_max_dots;
case oCanonicalizeMaxDots:
intptr = &options->canonicalize_max_dots;
goto parse_int;
case oCanonicaliseFallbackLocal:
intptr = &options->canonicalise_fallback_local;
case oCanonicalizeFallbackLocal:
intptr = &options->canonicalize_fallback_local;
goto parse_flag;
case oDeprecated:
@ -1528,9 +1528,9 @@ initialize_options(Options * options)
options->ignored_unknown = NULL;
options->num_canonical_domains = 0;
options->num_permitted_cnames = 0;
options->canonicalise_max_dots = -1;
options->canonicalise_fallback_local = -1;
options->canonicalise_hostname = -1;
options->canonicalize_max_dots = -1;
options->canonicalize_fallback_local = -1;
options->canonicalize_hostname = -1;
}
/*
@ -1684,12 +1684,12 @@ fill_default_options(Options * options)
options->request_tty = REQUEST_TTY_AUTO;
if (options->proxy_use_fdpass == -1)
options->proxy_use_fdpass = 0;
if (options->canonicalise_max_dots == -1)
options->canonicalise_max_dots = 1;
if (options->canonicalise_fallback_local == -1)
options->canonicalise_fallback_local = 1;
if (options->canonicalise_hostname == -1)
options->canonicalise_hostname = SSH_CANONICALISE_NO;
if (options->canonicalize_max_dots == -1)
options->canonicalize_max_dots = 1;
if (options->canonicalize_fallback_local == -1)
options->canonicalize_fallback_local = 1;
if (options->canonicalize_hostname == -1)
options->canonicalize_hostname = SSH_CANONICALISE_NO;
#define CLEAR_ON_NONE(v) \
do { \
if (v != NULL && strcasecmp(v, "none") == 0) { \

View File

@ -1,4 +1,4 @@
/* $OpenBSD: readconf.h,v 1.98 2013/10/16 02:31:46 djm Exp $ */
/* $OpenBSD: readconf.h,v 1.99 2013/10/16 22:49:38 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
@ -148,9 +148,9 @@ typedef struct {
int num_canonical_domains;
char *canonical_domains[MAX_CANON_DOMAINS];
int canonicalise_hostname;
int canonicalise_max_dots;
int canonicalise_fallback_local;
int canonicalize_hostname;
int canonicalize_max_dots;
int canonicalize_fallback_local;
int num_permitted_cnames;
struct allowed_cname permitted_cnames[MAX_CANON_DOMAINS];

10
ssh.1
View File

@ -33,7 +33,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\" $OpenBSD: ssh.1,v 1.338 2013/10/16 02:31:46 djm Exp $
.\" $OpenBSD: ssh.1,v 1.339 2013/10/16 22:49:38 djm Exp $
.Dd $Mdocdate: October 16 2013 $
.Dt SSH 1
.Os
@ -418,10 +418,10 @@ For full details of the options listed below, and their possible values, see
.It BatchMode
.It BindAddress
.It CanonicalDomains
.It CanonicaliseFallbackLocal
.It CanonicaliseHostname
.It CanonicaliseMaxDots
.It CanonicalisePermittedCNAMEs
.It CanonicalizeFallbackLocal
.It CanonicalizeHostname
.It CanonicalizeMaxDots
.It CanonicalizePermittedCNAMEs
.It ChallengeResponseAuthentication
.It CheckHostIP
.It Cipher

32
ssh.c
View File

@ -1,4 +1,4 @@
/* $OpenBSD: ssh.c,v 1.385 2013/10/16 02:31:46 djm Exp $ */
/* $OpenBSD: ssh.c,v 1.386 2013/10/16 22:49:39 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@ -275,14 +275,14 @@ check_follow_cname(char **namep, const char *cname)
if (*cname == '\0' || options.num_permitted_cnames == 0 ||
strcmp(*namep, cname) == 0)
return 0;
if (options.canonicalise_hostname == SSH_CANONICALISE_NO)
if (options.canonicalize_hostname == SSH_CANONICALISE_NO)
return 0;
/*
* Don't attempt to canonicalise names that will be interpreted by
* Don't attempt to canonicalize names that will be interpreted by
* a proxy unless the user specifically requests so.
*/
if (options.proxy_command != NULL &&
options.canonicalise_hostname != SSH_CANONICALISE_ALWAYS)
options.canonicalize_hostname != SSH_CANONICALISE_ALWAYS)
return 0;
debug3("%s: check \"%s\" CNAME \"%s\"", __func__, *namep, cname);
for (i = 0; i < options.num_permitted_cnames; i++) {
@ -292,7 +292,7 @@ check_follow_cname(char **namep, const char *cname)
match_pattern_list(cname, rule->target_list,
strlen(rule->target_list), 1) != 1)
continue;
verbose("Canonicalised DNS aliased hostname "
verbose("Canonicalized DNS aliased hostname "
"\"%s\" => \"%s\"", *namep, cname);
free(*namep);
*namep = xstrdup(cname);
@ -307,20 +307,20 @@ check_follow_cname(char **namep, const char *cname)
* if no name was found after canonicalisation.
*/
static struct addrinfo *
resolve_canonicalise(char **hostp, u_int port)
resolve_canonicalize(char **hostp, u_int port)
{
int i, ndots;
char *cp, *fullhost, cname_target[NI_MAXHOST];
struct addrinfo *addrs;
if (options.canonicalise_hostname == SSH_CANONICALISE_NO)
if (options.canonicalize_hostname == SSH_CANONICALISE_NO)
return NULL;
/*
* Don't attempt to canonicalise names that will be interpreted by
* Don't attempt to canonicalize names that will be interpreted by
* a proxy unless the user specifically requests so.
*/
if (options.proxy_command != NULL &&
options.canonicalise_hostname != SSH_CANONICALISE_ALWAYS)
options.canonicalize_hostname != SSH_CANONICALISE_ALWAYS)
return NULL;
/* Don't apply canonicalisation to sufficiently-qualified hostnames */
ndots = 0;
@ -328,9 +328,9 @@ resolve_canonicalise(char **hostp, u_int port)
if (*cp == '.')
ndots++;
}
if (ndots > options.canonicalise_max_dots) {
debug3("%s: not canonicalising hostname \"%s\" (max dots %d)",
__func__, *hostp, options.canonicalise_max_dots);
if (ndots > options.canonicalize_max_dots) {
debug3("%s: not canonicalizing hostname \"%s\" (max dots %d)",
__func__, *hostp, options.canonicalize_max_dots);
return NULL;
}
/* Attempt each supplied suffix */
@ -347,14 +347,14 @@ resolve_canonicalise(char **hostp, u_int port)
fullhost[strlen(fullhost) - 1] = '\0';
/* Follow CNAME if requested */
if (!check_follow_cname(&fullhost, cname_target)) {
debug("Canonicalised hostname \"%s\" => \"%s\"",
debug("Canonicalized hostname \"%s\" => \"%s\"",
*hostp, fullhost);
}
free(*hostp);
*hostp = fullhost;
return addrs;
}
if (!options.canonicalise_fallback_local)
if (!options.canonicalize_fallback_local)
fatal("%s: Could not resolve host \"%s\"", __progname, host);
return NULL;
}
@ -907,8 +907,8 @@ main(int ac, char **av)
}
/* If canonicalisation requested then try to apply it */
if (options.canonicalise_hostname != SSH_CANONICALISE_NO)
addrs = resolve_canonicalise(&host, options.port);
if (options.canonicalize_hostname != SSH_CANONICALISE_NO)
addrs = resolve_canonicalize(&host, options.port);
/*
* If canonicalisation not requested, or if it failed then try to
* resolve the bare hostname name using the system resolver's usual

View File

@ -33,7 +33,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\" $OpenBSD: ssh_config.5,v 1.172 2013/10/16 06:42:25 jmc Exp $
.\" $OpenBSD: ssh_config.5,v 1.173 2013/10/16 22:49:39 djm Exp $
.Dd $Mdocdate: October 16 2013 $
.Dt SSH_CONFIG 5
.Os
@ -202,10 +202,10 @@ is set to
.Dq yes .
.It Cm CanonicalDomains
When
.Cm CanonicaliseHostname
.Cm CanonicalizeHostname
is enabled, this option specifies the list of domain suffixes in which to
search for the specified destination host.
.It Cm CanonicaliseFallbackLocal
.It Cm CanonicalizeFallbackLocal
Specifies whether to fail with an error when hostname canonicalisation fails.
The default,
.Dq no ,
@ -216,11 +216,11 @@ A value of
will cause
.Xr ssh 1
to fail instantly if
.Cm CanonicaliseHostname
.Cm CanonicalizeHostname
is enabled and the target hostname cannot be found in any of the domains
specified by
.Cm CanonicalDomains .
.It Cm CanonicaliseHostname
.It Cm CanonicalizeHostname
Controls whether explicit hostname canonicalisation is performed.
The default,
.Dq no ,
@ -231,26 +231,26 @@ If set to
then, for connections that do not use a
.Cm ProxyCommand ,
.Xr ssh 1
will attempt to canonicalise the hostname specified on the command line
will attempt to canonicalize the hostname specified on the command line
using the
.Cm CanonicalDomains
suffixes and
.Cm CanonicalisePermittedCNAMEs
.Cm CanonicalizePermittedCNAMEs
rules.
If
.Cm CanonicaliseHostname
.Cm CanonicalizeHostname
is set to
.Dq always ,
then canonicalisation is applied to proxied connections too.
.It Cm CanonicaliseMaxDots
.It Cm CanonicalizeMaxDots
Specifies the maximum number of dot characters in a hostname before
canonicalisation is disabled.
The default,
.Dq 1 ,
allows a single dot (i.e. hostname.subdomain).
.It Cm CanonicalisePermittedCNAMEs
.It Cm CanonicalizePermittedCNAMEs
Specifies rules to determine whether CNAMEs should be followed when
canonicalising hostnames.
canonicalizing hostnames.
The rules consist of one or more arguments of
.Ar source_domain_list : Ns Ar target_domain_list ,
where
@ -264,7 +264,7 @@ For example,
.Dq *.a.example.com:*.b.example.com,*.c.example.com
will allow hostnames matching
.Dq *.a.example.com
to be canonicalised to names in the
to be canonicalized to names in the
.Dq *.b.example.com
or
.Dq *.c.example.com