Bugzilla – Attachment 3489 Details for
Bug 3288
Ignoring comments at end of config file lines broke ProxyCommand with #-sign in script
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix proposal.
0001-Ignoring-comments-at-end-of-config-file-lines-broke-.patch (text/plain), 1.54 KB, created by
Tomi Salminen
on 2021-03-26 08:27:27 AEDT
(
hide
)
Description:
Fix proposal.
Filename:
MIME Type:
Creator:
Tomi Salminen
Created:
2021-03-26 08:27:27 AEDT
Size:
1.54 KB
patch
obsolete
>From 243996364c2db4fe22647bf98a8701c6ed3f13c9 Mon Sep 17 00:00:00 2001 >From: Tomi Salminen <tlsalmin@gmail.com> >Date: Thu, 25 Mar 2021 23:11:10 +0200 >Subject: [PATCH] Ignoring comments at end of config file lines broke > ProxyCommand. > >If all lines are negated from the hash-sign onwards, any existing >options with embedded hash-signs are truncated. e.g. If there are >bash parts that manipulate strings. > >The value is too free form to keep a good tab on when the >hash-sign is meant to be in the value and when not. > >Unfortunately as 8.5 is released, there probably already exist >config files that have comments at the end of options. > >Changed the comment remover to ignore only lines having a >hash-sign as the first non-space character. This will break 8.5 >configurations with hash-comments at the end of functional lines. >--- > readconf.c | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) > >diff --git a/readconf.c b/readconf.c >index 724974b7..61d558e5 100644 >--- a/readconf.c >+++ b/readconf.c >@@ -2133,8 +2133,14 @@ read_config_file_depth(const char *filename, struct passwd *pw, > * NB - preserve newlines, they are needed to reproduce > * line numbers later for error messages. > */ >- if ((cp = strchr(line, '#')) != NULL) >- *cp = '\0'; >+ for (cp = line; (cp - line) < linesize && *cp; cp++) { >+ if (!isspace(*cp)) { >+ if (*cp == '#') { >+ *cp = '\0'; >+ } >+ break; >+ } >+ } > if (process_config_line_depth(options, pw, host, original_host, > line, filename, linenum, activep, flags, want_final_pass, > depth) != 0) >-- >2.30.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 3288
:
3489
|
3528