Bug 264999 - databases/mariadb106-server: conf.d/wsrep.cnf overrides bind-address in conf.d/server.cnf.
Summary: databases/mariadb106-server: conf.d/wsrep.cnf overrides bind-address in conf....
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: Bernard Spil
URL:
Keywords: needs-patch, needs-qa, regression, security
Depends on:
Blocks:
 
Reported: 2022-07-02 18:45 UTC by ingenium
Modified: 2023-04-10 11:46 UTC (History)
4 users (show)

See Also:
dinoex: maintainer-feedback? (brnrd)
dinoex: merge-quarterly?


Attachments
Patch to change installation options for wsrep.cnf.sample (1.28 KB, patch)
2023-02-24 13:50 UTC, Toshimichi Masubuchi
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ingenium 2022-07-02 18:45:15 UTC
After a fresh installation of MariaDB 10.6.8, the service listens on all interfaces, although bind-address = 127.0.0.1 is set in /usr/local/etc/mysql/conf.d/server.cnf.

After some research, the problem is in the file /usr/local/etc/mysql/conf.d/wsrep.cnf which overrides the settings in /usr/local/etc/mysql/conf.d/server.cnf.

In this file bind-address is set to 0.0.0.0 which overrides the settings of the server config.

This should be deactivated by default, otherwise it will negatively affect the pure server configuration and thus possibly impair security.
Comment 1 Dirk Meyer freebsd_committer freebsd_triage 2022-07-02 19:12:52 UTC
fix Summary, assign to maintainer.
Comment 2 Dirk Meyer freebsd_committer freebsd_triage 2022-07-03 16:05:28 UTC
This issue did not exist in:
databases/mariadb104-server
databases/mariadb105-server

as conf.d/wsrep.cnf ins not installed.
Only conf.d/wsrep.cnf.sample exists there.
Comment 3 Toshimichi Masubuchi 2023-02-24 13:50:45 UTC
Created attachment 240374 [details]
Patch to change installation options for wsrep.cnf.sample

In databases/mariadb106-server, the @sample macro is added to wsrep.cnf.sample,
so wsrep.cnf is also created during installation.

  mariadb104-server/pkg-plist:
    %%WSREP%%%%ETCDIR%%/conf.d/wsrep.cnf.sample
  mariadb105-server/pkg-plist:
    %%WSREP%%%%ETCDIR%%/conf.d/wsrep.cnf.sample
  mariadb106-server/pkg-plist: (commit: fb3d4f1)
    %%WSREP%%@sample %%ETCDIR%%/conf.d/wsrep.cnf.sample

I have created a patch to prevent wsrep.cnf from being installed by default.
(This is the same behavior as in previous versions.)