]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream commit
authordjm@openbsd.org <djm@openbsd.org>
Fri, 6 Jan 2017 03:53:58 +0000 (03:53 +0000)
committerDamien Miller <djm@mindrot.org>
Mon, 30 Jan 2017 00:05:18 +0000 (11:05 +1100)
show a useful error message when included config files
can't be opened; bz#2653, ok dtucker@

Upstream-ID: f598b73b5dfe497344cec9efc9386b4e5a3cb95b

readconf.c

index fa3fab8f080b11eef57aba3395c64083bfca1c16..3588ee9064c481f98013bd6e76b471d726c21282 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: readconf.c,v 1.262 2016/10/25 04:08:13 jsg Exp $ */
+/* $OpenBSD: readconf.c,v 1.263 2017/01/06 03:53:58 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1502,6 +1502,11 @@ parse_keytypes:
                                    flags | SSHCONF_CHECKPERM |
                                    (oactive ? 0 : SSHCONF_NEVERMATCH),
                                    activep, depth + 1);
+                               if (errno != ENOENT) {
+                                       fatal("Can't open user config file "
+                                           "%.100s: %.100s", gl.gl_pathv[i],
+                                           strerror(errno));
+                               }
                                /*
                                 * don't let Match in includes clobber the
                                 * containing file's Match state.