Fix "Hostname" parsing in OpenSSH config files, as reported at . From: Niels Ole Salscheider Date: Mon, 8 May 2017 17:36:13 +0200 Subject: [PATCH] Fix reading of the first parameter This is a fixup for 7b8b5eb4eac314a3a29be812bef0264c6611f6e7. Previously, it would return as long as the parameter was _not_ seen before. It also did not handle the case for the unsupported opcode (-1) which would cause a segfault when accessing the "seen" array. --- src/config.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/config.c b/src/config.c index 7c03b27..238a655 100644 --- a/src/config.c +++ b/src/config.c @@ -218,8 +218,9 @@ static int ssh_config_parse_line(ssh_session session, const char *line, } opcode = ssh_config_get_opcode(keyword); - if (*parsing == 1 && opcode != SOC_HOST) { - if (seen[opcode] == 0) { + if (*parsing == 1 && opcode != SOC_HOST && + opcode > SOC_UNSUPPORTED && opcode < SOC_END) { + if (seen[opcode] == 1) { return 0; } seen[opcode] = 1; fac2e24ac926f155d76e42aa90690467'>refslogtreecommitdiff
AgeCommit message (Expand)Author
2024-08-11gnu: Replace (almost) all uses of /run/setuid-programs....…those good for master, anyway. * gnu/packages/admin.scm (ktsuss, opendoas, hosts) [arguments]: Replace /run/setuid-programs with /run/privileged/bin. * gnu/packages/containers.scm (slirp4netns)[arguments]: Likewise. * gnu/packages/debian.scm (pbuilder)[arguments]: Likewise. * gnu/packages/disk.scm (udevil)[arguments]: Likewise. * gnu/packages/enlightenment.scm (efl, enlightenment) [arguments]: Likewise. * gnu/packages/gnome.scm (gdm, gnome-control-center) [arguments]: Likewise. * gnu/packages/linux.scm (singularity)[arguments]: Likewise. * gnu/packages/lxde.scm (spacefm)[arguments]: Likewise. * gnu/packages/monitoring.scm (zabbix-agentd)[arguments]: Likewise. * gnu/packages/virtualization.scm (ganeti)[arguments]: Likewise. * gnu/packages/xdisorg.scm (xsecurelock)[arguments]: Likewise. * gnu/services/dbus.scm (dbus-configuration-directory): Likewise. * gnu/services/ganeti.scm (%default-ganeti-environment-variables): Likewise. * gnu/services/monitoring.scm (zabbix-agent-shepherd-service): Likewise. * gnu/tests/ldap.scm (marionette): Likewise. * gnu/tests/monitoring.scm (os): Likewise. Tobias Geerinckx-Rice