diff options
author | dtucker@openbsd.org <dtucker@openbsd.org> | 2022-02-08 08:59:12 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2022-02-10 15:14:17 +1100 |
commit | 45279abceb37c3cbfac8ba36dde8b2c8cdd63d32 (patch) | |
tree | 739b13b19b03c5c8f0b65ff8188240d4f4ee68c1 /readconf.c | |
parent | a1bcbf04a7c2d81944141db7ecd0ba292d175a66 (diff) | |
download | openssh-git-45279abceb37c3cbfac8ba36dde8b2c8cdd63d32.tar.gz |
upstream: Switch hpdelim interface to accept only ":" as delimiter.
Historicallly, hpdelim accepted ":" or "/" as a port delimiter between
hosts (or addresses) and ports. These days most of the uses for "/"
are no longer accepted, so there are several places where it checks the
delimiter to disallow it. Make hpdelim accept only ":" and use hpdelim2
in the other cases. ok djm@
OpenBSD-Commit-ID: 7e6420bd1be87590b6840973f5ad5305804e3102
Diffstat (limited to 'readconf.c')
-rw-r--r-- | readconf.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: readconf.c,v 1.365 2022/02/04 02:49:17 dtucker Exp $ */ +/* $OpenBSD: readconf.c,v 1.366 2022/02/08 08:59:12 dtucker Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -943,7 +943,7 @@ process_config_line_depth(Options *options, struct passwd *pw, const char *host, const char *original_host, char *line, const char *filename, int linenum, int *activep, int flags, int *want_final_pass, int depth) { - char *str, **charptr, *endofnumber, *keyword, *arg, *arg2, *p, ch; + char *str, **charptr, *endofnumber, *keyword, *arg, *arg2, *p; char **cpptr, ***cppptr, fwdarg[256]; u_int i, *uintptr, uvalue, max_entries = 0; int r, oactive, negated, opcode, *intptr, value, value2, cmdline = 0; @@ -1584,9 +1584,8 @@ parse_pubkey_algos: } while ((arg = argv_next(&ac, &av)) != NULL) { arg2 = xstrdup(arg); - ch = '\0'; - p = hpdelim2(&arg, &ch); - if (p == NULL || ch == '/') { + p = hpdelim(&arg); + if (p == NULL) { fatal("%s line %d: missing host in %s", filename, linenum, lookup_opcode_name(opcode)); |