summaryrefslogtreecommitdiffstats
path: root/readconf.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2013-04-05 02:18:35 +0200
committerDarren Tucker <dtucker@zip.com.au>2013-04-05 02:18:35 +0200
commitaefa3682431f59cf1ad9a0f624114b135135aa44 (patch)
tree8f4e2412051f8cc0e75bc31703796e03781769e5 /readconf.c
parent - dtucker@cvs.openbsd.org 2013/02/19 02:12:47 (diff)
downloadopenssh-aefa3682431f59cf1ad9a0f624114b135135aa44.tar.xz
openssh-aefa3682431f59cf1ad9a0f624114b135135aa44.zip
- 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 'readconf.c')
-rw-r--r--readconf.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/readconf.c b/readconf.c
index 6f978f828..36265e431 100644
--- a/readconf.c
+++ b/readconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: readconf.c,v 1.195 2013/02/17 23:16:57 dtucker Exp $ */
+/* $OpenBSD: readconf.c,v 1.196 2013/02/22 04:45:08 dtucker Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -373,7 +373,7 @@ parse_token(const char *cp, const char *filename, int linenum)
int
process_config_line(Options *options, const char *host,
char *line, const char *filename, int linenum,
- int *activep)
+ int *activep, int userconfig)
{
char *s, **charptr, *endofnumber, *keyword, *arg, *arg2;
char **cpptr, fwdarg[256];
@@ -606,7 +606,7 @@ parse_yesnoask:
if (*intptr >= SSH_MAX_IDENTITY_FILES)
fatal("%.200s line %d: Too many identity files specified (max %d).",
filename, linenum, SSH_MAX_IDENTITY_FILES);
- add_identity_file(options, NULL, arg, 1);
+ add_identity_file(options, NULL, arg, userconfig);
}
break;
@@ -1093,7 +1093,7 @@ parse_int:
int
read_config_file(const char *filename, const char *host, Options *options,
- int checkperm)
+ int flags)
{
FILE *f;
char line[1024];
@@ -1103,7 +1103,7 @@ read_config_file(const char *filename, const char *host, Options *options,
if ((f = fopen(filename, "r")) == NULL)
return 0;
- if (checkperm) {
+ if (flags & SSHCONF_CHECKPERM) {
struct stat sb;
if (fstat(fileno(f), &sb) == -1)
@@ -1124,7 +1124,8 @@ read_config_file(const char *filename, const char *host, Options *options,
while (fgets(line, sizeof(line), f)) {
/* Update line number counter. */
linenum++;
- if (process_config_line(options, host, line, filename, linenum, &active) != 0)
+ if (process_config_line(options, host, line, filename, linenum,
+ &active, flags & SSHCONF_USERCONF) != 0)
bad_options++;
}
fclose(f);