Skip to content
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

dnsdist: Disable Lua configuration directives in YAML mode #15158

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rgacogne
Copy link
Member

Short description

This commit restricts the Lua directives available to a Lua script loaded alongside with a YAML configuration, disabling all Lua configuration directives. This prevents a mess when settings are set to different values in YAML and Lua, and make it clear that the when a YAML configuration is used, any Lua file should only be used to provide functions to the YAML configuration.
This behaviour can be reverted via the enableLuaConfiguration directive if really needed.

Checklist

I have:

  • read the CONTRIBUTING.md document
  • compiled this code
  • tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)

This commit restricts the Lua directives available to a Lua script
loaded alongside with a YAML configuration, disabling all Lua
configuration directives. This prevents a mess when settings are
set to different values in YAML and Lua, and make it clear that the
when a YAML configuration is used, any Lua file should only be used
to provide functions to the YAML configuration.
This behaviour can be reverted via the `enableLuaConfiguration`
directive if really needed.
Copy link
Contributor

@miodvallat miodvallat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not pretending to understand all of this, but no alarm signals raised while reading.

@coveralls
Copy link

coveralls commented Feb 14, 2025

Pull Request Test Coverage Report for Build 13326662864

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 27 of 33 (81.82%) changed or added relevant lines in 2 files are covered.
  • 6269 unchanged lines in 77 files lost coverage.
  • Overall coverage increased (+0.03%) to 64.632%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pdns/dnsdistdist/dnsdist.cc 7 9 77.78%
pdns/dnsdistdist/dnsdist-lua.cc 20 24 83.33%
Files with Coverage Reduction New Missed Lines %
ext/lmdb-safe/lmdb-typed.hh 1 73.19%
modules/gpgsqlbackend/gpgsqlbackend.cc 1 88.62%
pdns/pollmplexer.cc 1 83.66%
pdns/recursordist/rec-rust-lib/rust/src/bridge.hh 1 0.0%
pdns/recursordist/sortlist.hh 1 75.0%
ext/probds/murmur3.cc 2 94.12%
pdns/dnsname.hh 2 91.4%
pdns/dnstap.cc 2 70.97%
pdns/recursordist/secpoll-recursor.cc 2 50.0%
pdns/tcpiohandler.cc 2 68.18%
Totals Coverage Status
Change from base Build 13326341755: 0.03%
Covered Lines: 127921
Relevant Lines: 166884

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants