-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lua: remove default search path for output modules - v1 #12563
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #12563 +/- ##
=======================================
Coverage 80.70% 80.70%
=======================================
Files 928 928
Lines 259013 259034 +21
=======================================
+ Hits 209033 209055 +22
+ Misses 49980 49979 -1
Flags with carried forward coverage won't be shown. Click here to find out more. |
Information: QA ran without warnings. Pipeline 24690 |
src/output-lua.c
Outdated
BUG_ON(parent_ctx == NULL); | ||
LogLuaMasterCtx *mc = parent_ctx->data; | ||
BUG_ON(mc == NULL); | ||
|
||
const char *dir = ""; | ||
if (parent_ctx && parent_ctx->data) { | ||
LogLuaMasterCtx *mc = parent_ctx->data; | ||
dir = mc->path; | ||
} | ||
dir = mc->script_dir; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is all to show that I don't think parent_ctx and parent_ctx->data can be NULL anymore, or its not clear how we could here with them being NULL.
c6a8703
to
a8311af
Compare
It had a rather generic name of "path", which in Lua usually means a search path, which we'll be adding.
By default, use an empty search path. This gives us a predictable default. If a user needs access to external modules, the search path must be set in the configuration file. Ticket: OISF#7169
- Sandboxed Lua for rules - Search path changes for Lua output scripts
a8311af
to
1f8fab7
Compare
Information: QA ran without warnings. Pipeline 24701 |
Replaced by #12576 |
Removes the search path for Lua modules. It now must be set in the
configuration file. This provides a consistent starting point for all installs
of Suricata.
As we no longer use the system provided Lua, we can't provide a sane default
for every installation environment.
Ticket: https://redmine.openinfosecfoundation.org/issues/7169