Bugzilla – Attachment 2938 Details for
Bug 2431
Form feed is not treated as whitespace in config files.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
allow \f at EOL
bz2431.diff (text/plain), 1.07 KB, created by
Damien Miller
on 2017-02-03 15:18:27 AEDT
(
hide
)
Description:
allow \f at EOL
Filename:
MIME Type:
Creator:
Damien Miller
Created:
2017-02-03 15:18:27 AEDT
Size:
1.07 KB
patch
obsolete
>diff --git a/readconf.c b/readconf.c >index bccd0f3..0b7c311 100644 >--- a/readconf.c >+++ b/readconf.c >@@ -827,11 +827,11 @@ process_config_line_depth(Options *options, struct passwd *pw, const char *host, > activep = &cmdline; > } > >- /* Strip trailing whitespace */ >+ /* Strip trailing whitespace. Allow \f (form feed) at EOL only */ > if ((len = strlen(line)) == 0) > return 0; > for (len--; len > 0; len--) { >- if (strchr(WHITESPACE, line[len]) == NULL) >+ if (strchr(WHITESPACE "\f", line[len]) == NULL) > break; > line[len] = '\0'; > } >diff --git a/servconf.c b/servconf.c >index 6412de7..daf9095 100644 >--- a/servconf.c >+++ b/servconf.c >@@ -920,6 +920,15 @@ process_server_config_line(ServerOptions *options, char *line, > long long val64; > const struct multistate *multistate_ptr; > >+ /* Strip trailing whitespace. Allow \f (form feed) at EOL only */ >+ if ((len = strlen(line)) == 0) >+ return 0; >+ for (len--; len > 0; len--) { >+ if (strchr(WHITESPACE "\f", line[len]) == NULL) >+ break; >+ line[len] = '\0'; >+ } >+ > cp = line; > if ((arg = strdelim(&cp)) == NULL) > return 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
Flags:
dtucker
:
ok+
Actions:
View
|
Diff
Attachments on
bug 2431
: 2938