diff options
author | Damien Miller <djm@mindrot.org> | 2013-10-15 12:14:12 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2013-10-15 12:14:12 +1100 |
commit | e9fc72edd6c313b670558cd5219601c38a949b67 (patch) | |
tree | 32ed93978e93622d5829a55cbc0479e00b1161bf /ssh.c | |
parent | 194fd904d8597a274b93e075b2047afdf5a175d4 (diff) | |
download | openssh-git-e9fc72edd6c313b670558cd5219601c38a949b67.tar.gz |
- djm@cvs.openbsd.org 2013/10/14 23:28:23
[canohost.c misc.c misc.h readconf.c sftp-server.c ssh.c]
refactor client config code a little:
add multistate option partsing to readconf.c, similar to servconf.c's
existing code.
move checking of options that accept "none" as an argument to readconf.c
add a lowercase() function and use it instead of explicit tolower() in
loops
part of a larger diff that was ok markus@
Diffstat (limited to 'ssh.c')
-rw-r--r-- | ssh.c | 28 |
1 files changed, 9 insertions, 19 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.382 2013/10/14 22:22:04 djm Exp $ */ +/* $OpenBSD: ssh.c,v 1.383 2013/10/14 23:28:23 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -723,6 +723,14 @@ main(int ac, char **av) channel_set_af(options.address_family); + /* Tidy and check options */ + if (options.host_key_alias != NULL) + lowercase(options.host_key_alias); + if (options.proxy_command != NULL && + strcmp(options.proxy_command, "-") == 0 && + options.proxy_use_fdpass) + fatal("ProxyCommand=- and ProxyUseFDPass are incompatible"); + /* reinit */ log_init(argv0, options.log_level, SYSLOG_FACILITY_USER, !use_syslog); @@ -779,24 +787,6 @@ main(int ac, char **av) free(cp); } - /* force lowercase for hostkey matching */ - if (options.host_key_alias != NULL) { - for (p = options.host_key_alias; *p; p++) - if (isupper(*p)) - *p = (char)tolower(*p); - } - - if (options.proxy_command != NULL && - strcmp(options.proxy_command, "none") == 0) { - free(options.proxy_command); - options.proxy_command = NULL; - } - if (options.control_path != NULL && - strcmp(options.control_path, "none") == 0) { - free(options.control_path); - options.control_path = NULL; - } - if (options.control_path != NULL) { cp = tilde_expand_filename(options.control_path, original_real_uid); |