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

Make sure "logger" message arguments are not interpreted as command line switches #3492

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

Conversation

hartmut-mariadb
Copy link
Contributor

  • The Jira issue number for this PR is: MDEV-34847

Description

There was a case where logger would report "invalid option 'r'" as the actual output was "ls -l" output

Properly quoting the subshell output, and adding '--' before the message argument to make sure it does not get interpreted as command line switch even when starting with a '-', prevents this from happening again.

Release Notes

Not relevant enough to be mentioned in release notes I say.

How can this PR be tested?

I only noticed this when trying to upgrade a Galera cluster from 10.x to 11.x, had never seen the "invalid option" output in error logs before. So it is rather tricky to actually test, but should be easy to be reviewed as it is just basic shell stuff.

Basing the PR against the correct MariaDB version

  • This is a new feature or a refactoring, and the PR is based against the main branch.
  • This is a bug fix, and the PR is based against the earliest maintained branch in which the bug can be reproduced.

PR quality check

  • I checked the CODING_STANDARDS.md file and my PR conforms to this where appropriate.
  • For any trivial modifications to the PR, I am ok with the reviewer making the changes themselves.

…gument warnings

Added missing logger command argument quoting.

And fixed a wsrep_log call typo.
…gument warnings

Make sure that even a quoted argument starting with '-' is not interpreted
as a command line option by adding '--' marker before message text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants