Bugzilla – Attachment 2920 Details for
Bug 2653
Including files without read access in ssh configuration fails without error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed patch
file_2653.txt (text/plain), 1.44 KB, created by
Jakub Jelen
on 2016-12-27 09:41:30 AEDT
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Jakub Jelen
Created:
2016-12-27 09:41:30 AEDT
Size:
1.44 KB
patch
obsolete
>diff --git a/readconf.c b/readconf.c >index fa3fab8..e7eb30d 100644 >--- a/readconf.c >+++ b/readconf.c >@@ -1499,7 +1499,7 @@ parse_keytypes: > oactive ? "" : " (parse only)"); > r = read_config_file_depth(gl.gl_pathv[i], > pw, host, original_host, options, >- flags | SSHCONF_CHECKPERM | >+ flags | SSHCONF_CHECKPERM | SSHCONF_IGNORE_READERR | > (oactive ? 0 : SSHCONF_NEVERMATCH), > activep, depth + 1); > /* >@@ -1707,8 +1707,13 @@ read_config_file_depth(const char *filename, struct passwd *pw, > if (depth < 0 || depth > READCONF_MAX_DEPTH) > fatal("Too many recursive configuration includes"); > >- if ((f = fopen(filename, "r")) == NULL) >+ if ((f = fopen(filename, "r")) == NULL) { >+ if (flags & SSHCONF_IGNORE_READERR) { >+ error("Can not open configuration file %s", filename); >+ return 1; >+ } > return 0; >+ } > > if (flags & SSHCONF_CHECKPERM) { > struct stat sb; >diff --git a/readconf.h b/readconf.h >index cef55f7..4f7d3b4 100644 >--- a/readconf.h >+++ b/readconf.h >@@ -190,6 +190,7 @@ typedef struct { > #define SSHCONF_USERCONF 2 /* user provided config file not system */ > #define SSHCONF_POSTCANON 4 /* After hostname canonicalisation */ > #define SSHCONF_NEVERMATCH 8 /* Match/Host never matches; internal only */ >+#define SSHCONF_IGNORE_READERR 16 /* Treat unreadable files as errors; internal only */ > > #define SSH_UPDATE_HOSTKEYS_NO 0 > #define SSH_UPDATE_HOSTKEYS_YES 1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 2653
:
2920
|
2928