summaryrefslogtreecommitdiffstats
path: root/crypto/openssh/ssh.c
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2013-04-24 12:36:37 +0000
committerdes <des@FreeBSD.org>2013-04-24 12:36:37 +0000
commit2bb075a095f16a9bbd8a92da9a92dce37f491f4e (patch)
treef9bae55863d71383d360bf7b7868aa6646b45618 /crypto/openssh/ssh.c
parent28d7b5b9032daad19533387a7f9c7abf72c9ad56 (diff)
downloadFreeBSD-src-2bb075a095f16a9bbd8a92da9a92dce37f491f4e.zip
FreeBSD-src-2bb075a095f16a9bbd8a92da9a92dce37f491f4e.tar.gz
Merge updated "no such identity file" patch.
PR: bin/178060
Diffstat (limited to 'crypto/openssh/ssh.c')
-rw-r--r--crypto/openssh/ssh.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/crypto/openssh/ssh.c b/crypto/openssh/ssh.c
index 2402457..2e704a9 100644
--- a/crypto/openssh/ssh.c
+++ b/crypto/openssh/ssh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh.c,v 1.371 2013/02/17 23:16:57 dtucker Exp $ */
+/* $OpenBSD: ssh.c,v 1.373 2013/02/22 22:09:01 djm Exp $ */
/* $FreeBSD$ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -598,7 +598,8 @@ main(int ac, char **av)
dummy = 1;
line = xstrdup(optarg);
if (process_config_line(&options, host ? host : "",
- line, "command-line", 0, &dummy) != 0)
+ line, "command-line", 0, &dummy, SSHCONF_USERCONF)
+ != 0)
exit(255);
xfree(line);
break;
@@ -692,14 +693,15 @@ main(int ac, char **av)
* file if the user specifies a config file on the command line.
*/
if (config != NULL) {
- if (!read_config_file(config, host, &options, 0))
+ if (!read_config_file(config, host, &options, SSHCONF_USERCONF))
fatal("Can't open user config file %.100s: "
"%.100s", config, strerror(errno));
} else {
r = snprintf(buf, sizeof buf, "%s/%s", pw->pw_dir,
_PATH_SSH_USER_CONFFILE);
if (r > 0 && (size_t)r < sizeof(buf))
- (void)read_config_file(buf, host, &options, 1);
+ (void)read_config_file(buf, host, &options,
+ SSHCONF_CHECKPERM|SSHCONF_USERCONF);
/* Read systemwide configuration file after user config. */
(void)read_config_file(_PATH_HOST_CONFIG_FILE, host,
@@ -1611,7 +1613,8 @@ load_public_identity_files(void)
fatal("load_public_identity_files: gethostname: %s",
strerror(errno));
for (i = 0; i < options.num_identity_files; i++) {
- if (n_ids >= SSH_MAX_IDENTITY_FILES) {
+ if (n_ids >= SSH_MAX_IDENTITY_FILES ||
+ strcasecmp(options.identity_files[i], "none") == 0) {
xfree(options.identity_files[i]);
continue;
}
OpenPOWER on IntegriCloud