diff options
author | Darren Tucker <dtucker@zip.com.au> | 2013-04-05 11:18:35 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2013-04-05 11:18:35 +1100 |
commit | aefa3682431f59cf1ad9a0f624114b135135aa44 (patch) | |
tree | 8f4e2412051f8cc0e75bc31703796e03781769e5 /ssh.c | |
parent | f3c38142435622d056582e851579d8647a233c7f (diff) |
- dtucker@cvs.openbsd.org 2013/02/22 04:45:09
[ssh.c readconf.c readconf.h]
Don't complain if IdentityFiles specified in system-wide configs are
missing. ok djm, deraadt
Diffstat (limited to 'ssh.c')
-rw-r--r-- | ssh.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh.c,v 1.371 2013/02/17 23:16:57 dtucker Exp $ */ | 1 | /* $OpenBSD: ssh.c,v 1.372 2013/02/22 04:45:09 dtucker 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 |
@@ -579,7 +579,8 @@ main(int ac, char **av) | |||
579 | dummy = 1; | 579 | dummy = 1; |
580 | line = xstrdup(optarg); | 580 | line = xstrdup(optarg); |
581 | if (process_config_line(&options, host ? host : "", | 581 | if (process_config_line(&options, host ? host : "", |
582 | line, "command-line", 0, &dummy) != 0) | 582 | line, "command-line", 0, &dummy, SSHCONF_USERCONF) |
583 | != 0) | ||
583 | exit(255); | 584 | exit(255); |
584 | xfree(line); | 585 | xfree(line); |
585 | break; | 586 | break; |
@@ -673,14 +674,15 @@ main(int ac, char **av) | |||
673 | * file if the user specifies a config file on the command line. | 674 | * file if the user specifies a config file on the command line. |
674 | */ | 675 | */ |
675 | if (config != NULL) { | 676 | if (config != NULL) { |
676 | if (!read_config_file(config, host, &options, 0)) | 677 | if (!read_config_file(config, host, &options, SSHCONF_USERCONF)) |
677 | fatal("Can't open user config file %.100s: " | 678 | fatal("Can't open user config file %.100s: " |
678 | "%.100s", config, strerror(errno)); | 679 | "%.100s", config, strerror(errno)); |
679 | } else { | 680 | } else { |
680 | r = snprintf(buf, sizeof buf, "%s/%s", pw->pw_dir, | 681 | r = snprintf(buf, sizeof buf, "%s/%s", pw->pw_dir, |
681 | _PATH_SSH_USER_CONFFILE); | 682 | _PATH_SSH_USER_CONFFILE); |
682 | if (r > 0 && (size_t)r < sizeof(buf)) | 683 | if (r > 0 && (size_t)r < sizeof(buf)) |
683 | (void)read_config_file(buf, host, &options, 1); | 684 | (void)read_config_file(buf, host, &options, |
685 | SSHCONF_CHECKPERM|SSHCONF_USERCONF); | ||
684 | 686 | ||
685 | /* Read systemwide configuration file after user config. */ | 687 | /* Read systemwide configuration file after user config. */ |
686 | (void)read_config_file(_PATH_HOST_CONFIG_FILE, host, | 688 | (void)read_config_file(_PATH_HOST_CONFIG_FILE, host, |