FreeBSD Bugzilla – Attachment 159681 Details for
Bug 202190
newsyslog include processing tries to parse directories as files
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
newsyslog.c patch to skip directories for includes
newsyslog.patch (text/plain), 572 bytes, created by
Gregory Neil Shapiro
on 2015-08-09 01:13:25 UTC
(
hide
)
Description:
newsyslog.c patch to skip directories for includes
Filename:
MIME Type:
Creator:
Gregory Neil Shapiro
Created:
2015-08-09 01:13:25 UTC
Size:
572 bytes
patch
obsolete
>Index: newsyslog.c >=================================================================== >--- newsyslog.c (revision 286461) >+++ newsyslog.c (working copy) >@@ -823,9 +823,15 @@ > STAILQ_INSERT_TAIL(&inclist, inc, inc_nextp); > > STAILQ_FOREACH(inc, &inclist, inc_nextp) { >- if (strcmp(inc->file, "-") != 0) >+ if (strcmp(inc->file, "-") != 0) { >+ struct stat st; >+ >+ if (stat(inc->file, &st) < 0) >+ err(1, "%s", inc->file); >+ if (S_ISDIR(st.st_mode)) >+ continue; > f = fopen(inc->file, "r"); >- else { >+ } else { > f = stdin; > inc->file = "<stdin>"; > }
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 202190
: 159681