View | Details | Raw Unified | Return to bug 2653 | Differences between
and this patch

Collapse All | Expand All

(-)a/readconf.c (-2 / +7 lines)
Lines 1499-1505 parse_keytypes: Link Here
1499
				    oactive ? "" : " (parse only)");
1499
				    oactive ? "" : " (parse only)");
1500
				r = read_config_file_depth(gl.gl_pathv[i],
1500
				r = read_config_file_depth(gl.gl_pathv[i],
1501
				    pw, host, original_host, options,
1501
				    pw, host, original_host, options,
1502
				    flags | SSHCONF_CHECKPERM |
1502
				    flags | SSHCONF_CHECKPERM | SSHCONF_IGNORE_READERR |
1503
				    (oactive ? 0 : SSHCONF_NEVERMATCH),
1503
				    (oactive ? 0 : SSHCONF_NEVERMATCH),
1504
				    activep, depth + 1);
1504
				    activep, depth + 1);
1505
				/*
1505
				/*
Lines 1707-1714 read_config_file_depth(const char *filename, struct passwd *pw, Link Here
1707
	if (depth < 0 || depth > READCONF_MAX_DEPTH)
1707
	if (depth < 0 || depth > READCONF_MAX_DEPTH)
1708
		fatal("Too many recursive configuration includes");
1708
		fatal("Too many recursive configuration includes");
1709
1709
1710
	if ((f = fopen(filename, "r")) == NULL)
1710
	if ((f = fopen(filename, "r")) == NULL) {
1711
		if (flags & SSHCONF_IGNORE_READERR) {
1712
			error("Can not open configuration file %s", filename);
1713
			return 1;
1714
		}
1711
		return 0;
1715
		return 0;
1716
	}
1712
1717
1713
	if (flags & SSHCONF_CHECKPERM) {
1718
	if (flags & SSHCONF_CHECKPERM) {
1714
		struct stat sb;
1719
		struct stat sb;
(-)a/readconf.h (+1 lines)
Lines 190-195 typedef struct { Link Here
190
#define SSHCONF_USERCONF	2  /* user provided config file not system */
190
#define SSHCONF_USERCONF	2  /* user provided config file not system */
191
#define SSHCONF_POSTCANON	4  /* After hostname canonicalisation */
191
#define SSHCONF_POSTCANON	4  /* After hostname canonicalisation */
192
#define SSHCONF_NEVERMATCH	8  /* Match/Host never matches; internal only */
192
#define SSHCONF_NEVERMATCH	8  /* Match/Host never matches; internal only */
193
#define SSHCONF_IGNORE_READERR	16 /* Treat unreadable files as errors; internal only */
193
194
194
#define SSH_UPDATE_HOSTKEYS_NO	0
195
#define SSH_UPDATE_HOSTKEYS_NO	0
195
#define SSH_UPDATE_HOSTKEYS_YES	1
196
#define SSH_UPDATE_HOSTKEYS_YES	1

Return to bug 2653