Bugzilla – Attachment 3460 Details for
Bug 2320
end-of-line comments work in sshd_config but not in ssh_config
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Strip comments from ssh config files
ssh-readconf-comment.patch (text/plain), 931 bytes, created by
Darren Tucker
on 2020-11-30 13:46:40 AEDT
(
hide
)
Description:
Strip comments from ssh config files
Filename:
MIME Type:
Creator:
Darren Tucker
Created:
2020-11-30 13:46:40 AEDT
Size:
931 bytes
patch
obsolete
>Index: readconf.c >=================================================================== >RCS file: /cvs/src/usr.bin/ssh/readconf.c,v >retrieving revision 1.342 >diff -u -p -r1.342 readconf.c >--- readconf.c 15 Nov 2020 22:34:58 -0000 1.342 >+++ readconf.c 30 Nov 2020 02:44:15 -0000 >@@ -1885,7 +1885,7 @@ read_config_file_depth(const char *filen > int flags, int *activep, int *want_final_pass, int depth) > { > FILE *f; >- char *line = NULL; >+ char *cp, *line = NULL; > size_t linesize = 0; > int linenum; > int bad_options = 0; >@@ -1916,6 +1916,9 @@ read_config_file_depth(const char *filen > while (getline(&line, &linesize, f) != -1) { > /* Update line number counter. */ > linenum++; >+ /* Trim out comments. */ >+ if ((cp = strchr(line, '#')) != NULL) >+ memcpy(cp, "\n", 2); > if (process_config_line_depth(options, pw, host, original_host, > line, filename, linenum, activep, flags, want_final_pass, > depth) != 0)
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 2320
:
2519
| 3460