Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.6, 10.11
-
Not for Release Notes
Description
While running MTR as a non-root user, the "Checking supported features…" phase calls collect_mysqld_features() in mysql-test/mariadb-test-run.pl, which probes:
mariadbd --no-defaults --datadir=. ... --verbose --help
|
When the test suite is executed from an installed location (e.g. /usr/share/mariadb/mariadb-test), --datadir=. makes MariaDB treat that installed directory as the datadir for the probe. During startup, MariaDB may run the datadir case-sensitivity check (test_if_case_insensitive() in sql/mysqld.cc), which attempts to create a *.lower-test file in the datadir.
This is a poor fit for installed test-suite paths that are effectively read-only, and it also triggers denials in restricted envs (for instance, AppArmor enforce mode). Example denial observed:
apparmor="DENIED" operation="mknod" name="/usr/share/mariadb/mariadb-test/mariadb-aa.lower-test" requested_mask="c" |
Steps to reproduce:
1. Install the MariaDB test suite so it resides under a shared read-only path (for instance, /usr/share/mariadb/mariadb-test).
2. Run MTR as a non-root user from that directory (or otherwise ensure collect_mysqld_features() runs with --datadir=. pointing to that installed tree).
3. Observe that mariadbd --verbose --help probe may attempt to create *.lower-test in that directory.
Notes:
This is not AppArmor-specific, AppArmor just makes the write attempt visible/fatal