Commit graph

134 commits

Author SHA1 Message Date
Marko Mäkelä
64cce8d5bf Merge 10.6 into 10.11 2024-02-14 16:12:53 +02:00
Marko Mäkelä
d86deee34b Fix GCC 14 -Wcalloc-transposed-args 2024-02-13 14:10:39 +02:00
Marko Mäkelä
ad13fb36bf Merge 10.6 into 10.11 2024-01-17 17:37:15 +02:00
Yuchen Pei
c9902a20b3
Merge branch '10.4' into 10.5 2024-01-10 18:01:46 +11:00
Sergei Golubchik
8172d07785 MDEV-33090 plugin/auth_pam/testing/pam_mariadb_mtr.c doesn't compile on Solaris
Fix by Rainer Orth
2024-01-08 13:57:51 +01:00
Sergei Golubchik
fd0b47f9d6 Merge branch '10.6' into 10.11 2023-12-18 11:19:04 +01:00
Sergei Golubchik
98a39b0c91 Merge branch '10.4' into 10.5 2023-12-02 01:02:50 +01:00
Oleksandr Byelkin
04d9a46c41 Merge branch '10.6' into 10.10 2023-11-08 16:23:30 +01:00
Oleksandr Byelkin
6cfd2ba397 Merge branch '10.4' into 10.5 2023-11-08 12:59:00 +01:00
Marko Mäkelä
01623ac9ea Fix clang -Wtypedef-redefinition 2023-11-06 10:32:39 +02:00
Marko Mäkelä
d5e15424d8 Merge 10.6 into 10.10
The MDEV-29693 conflict resolution is from Monty, as well as is
a bug fix where ANALYZE TABLE wrongly built histograms for
single-column PRIMARY KEY.
Also includes a fix for safe_malloc error reporting.

Other things:
- Copied main.log_slow from 10.4 to avoid mtr issue

Disabled test:
- spider/bugfix.mdev_27239 because we started to get
  +Error	1429 Unable to connect to foreign data source: localhost
  -Error	1158 Got an error reading communication packets
- main.delayed
  - Bug#54332 Deadlock with two connections doing LOCK TABLE+INSERT DELAYED
    This part is disabled for now as it fails randomly with different
    warnings/errors (no corruption).
2023-10-14 13:36:11 +03:00
Sergei Golubchik
156bf5298f fix SRPM builds on SLES 12.5, cmake 3.5.2
the bug with %attr(700,%{mysqld_user},-)
was fixed not right after 2.8.12, but only in 3.10.0

https://gitlab.kitware.com/cmake/cmake/-/commit/a351edd245
2023-10-12 08:49:58 +02:00
Marko Mäkelä
f8f7d9de2c Merge 10.4 into 10.5 2023-09-11 11:29:31 +03:00
Sergei Golubchik
fe86d04ea7 MDEV-30904 "rpm --setugids" breaks PAM authentication
move user/group creation from %post to %pre as Fedora packaging
guidelines say. This allows to use %attr() to set the correct
ownership of files
2023-09-06 22:38:41 +02:00
Oleksandr Byelkin
34a8e78581 Merge branch '10.6' into 10.9 2023-08-04 08:01:06 +02:00
Oleksandr Byelkin
7564be1352 Merge branch '10.4' into 10.5 2023-07-26 16:02:57 +02:00
Daniel Black
4b3f930639 MDEV-31336: pam_user_map : not supporting username or groupname containing @ character
Add @ to the allowed characters in a username.
2023-07-15 08:12:49 +10:00
Marko Mäkelä
1d1e0ab2cc Merge 10.6 into 10.8 2023-04-12 15:50:08 +03:00
Oleksandr Byelkin
ac5a534a4c Merge remote-tracking branch '10.4' into 10.5 2023-03-31 21:32:41 +02:00
Hugo Wen
7bdd878ae4 Fix few vulnerabilities found by Cppcheck
While performing SAST scanning using Cppcheck against source code of
commit 81196469, several code vulnerabilities were found.

Fix following issues:

1. Parameters of `snprintf` function are incorrect.

   Cppcheck error:

       client/mysql_plugin.c:1228: error: snprintf format string requires 6 parameters but only 5 are given.

   It is due to commit 630d7229 introduced option `--lc-messages-dir`
   in the bootstrap command. However the parameter was not even given
   in the `snprintf` after changing the format string.

   Fix:
   Restructure the code logic and correct the function parameters for
   `snprintf`.

2. Null pointer is used in a `snprintf` which could cause a crash.

   Cppcheck error:

       extra/mariabackup/xbcloud.cc:2534: error: Null pointer dereference

   The code intended to print the swift_project name, if the
   opt_swift_project_id is NULL but opt_swift_project is not NULL.
   However the parameter of `snprintf` was mistakenly using
   `opt_swift_project_id`.

   Fix:
   Change to use the correct string from `opt_swift_project`.

3. Potential double release of a memory

   Cppcheck error:

       plugin/auth_pam/testing/pam_mariadb_mtr.c:69: error: Memory pointed to by 'resp' is freed twice.

   A pointer `resp` is reused and allocated new memory after it has been
   freed. However, `resp` was not set to NULL after freed.
   Potential double release of the same pointer if the call back
   function doesn't allocate new memory for `resp` pointer.

   Fix:
   Set the `resp` pointer to NULL after the first free() to make sure
   the same address is not freed twice.

All new code of the whole pull request, including one or several files
that are either new files or modified ones, are contributed under the
BSD-new license. I am contributing on behalf of my employer Amazon Web
Services, Inc.
2023-03-02 14:38:24 +11:00
Sergei Golubchik
fd132be117 Merge branch '10.6' into 10.7 2022-05-11 11:25:33 +02:00
Sergei Golubchik
ef781162ff Merge branch '10.4' into 10.5 2022-05-09 22:04:06 +02:00
Alexey Botchkov
7215b00354 MDEV-28431 auth_pam tool left zombie processes.
The faulure in username packet reading can lead to the
auth_plugin_tool zombie. So check and close the application.
2022-04-28 15:40:08 +04:00
Sergei Golubchik
e6bbc83d5e MDEV-26212 PAM authentication fails with ENOMEM
use posix_spawn(), not fork() - it's better for systems that don't
overcommit memory
2022-04-26 11:21:04 +02:00
Marko Mäkelä
de4ec44b4f Fix clang -Wtypedef-redefinition
Include my_global.h before mysql.h so that the latter will not
redefine my_socket and my_ulonglong.

Fixup for commit 77c184df7c
2022-03-15 12:57:39 +02:00
Oleksandr Byelkin
cf63eecef4 Merge branch '10.4' into 10.5 2022-02-01 20:33:04 +01:00
Oleksandr Byelkin
a576a1cea5 Merge branch '10.3' into 10.4 2022-01-30 09:46:52 +01:00
Oleksandr Byelkin
41a163ac5c Merge branch '10.2' into 10.3 2022-01-29 15:41:05 +01:00
Monty
9d4c0a6cab Fixed compiler error in auth_pam plugin
Code copied from 10.6
2022-01-20 15:14:59 +02:00
Marko Mäkelä
15139964d5 Merge 10.5 into 10.6 2021-09-11 17:55:27 +03:00
Vicențiu Ciorbaru
7c33ecb665 Merge remote-tracking branch 'upstream/10.4' into 10.5 2021-09-10 17:16:18 +03:00
Sergei Golubchik
865e5b6405 MDEV-26487 cpack rpm failed to build packages with cmake < 3.7.0
buggy regexp in old CPackRPM.cmake:

    string(REGEX REPLACE "%[A-Za-z0-9\(\),-]* " "" F_PATH ${F})
    string(REGEX MATCH "%[A-Za-z0-9\(\),-]*" F_PREFIX ${F})

it treats everything after the first space as a path
2021-08-31 09:21:08 +02:00
Marko Mäkelä
cc4e20e56f Merge 10.5 into 10.6 2021-08-26 10:20:17 +03:00
Marko Mäkelä
87ff4ba7c8 Merge 10.4 into 10.5 2021-08-26 08:46:57 +03:00
Sergei Golubchik
dc6bc85cd2 MDEV-26380 auth_pam_tool has incorrect permissions on CentOS 7
Buggy sepdebugcrcfix in CentOS 7 (rpm-4.11.3) does not restore
SUID bit after editing the binary. This is fixed in rpm-4.12.

Still let's not set SUID bit when installing auth_pam_tool
and use rpm spec %attr directive instead.
2021-08-25 22:28:55 +02:00
Marko Mäkelä
49f95c4065 Merge 10.5 into 10.6 2021-08-23 11:21:33 +03:00
Alexey Bychko
c9d57c006a MDEV-26380 auth_pam_tool has incorrect permissions on CentOS 7
splitted permission setting to the 2 separate calls.
according to execute_process() doc, output from first command will be
piped to second which led to race and randomly lost suid bit from
auth_pam_tool.
2021-08-19 19:47:38 +07:00
Marko Mäkelä
e538cb095f Merge 10.5 into 10.6 2021-03-27 18:03:03 +02:00
Marko Mäkelä
80459bcbd4 Merge 10.4 into 10.5 2021-03-27 17:37:42 +02:00
Marko Mäkelä
7ae37ff74f Merge 10.3 into 10.4 2021-03-27 17:12:28 +02:00
Marko Mäkelä
3157fa182a Merge 10.2 into 10.3 2021-03-27 16:11:26 +02:00
Daniel Black
b58b289827 MDEV-25195: pam check getgrouplist function
AIX doesn't have getgrouplist so ensure function is checked.

The HAVE_POSIX_GETGROUPLIST check was insufficient.
2021-03-22 09:41:03 +11:00
Marko Mäkelä
46234f03c8 Merge 10.5 into 10.6 2021-01-25 12:56:30 +02:00
Marko Mäkelä
961c7938bb Merge 10.4 into 10.5 2021-01-25 12:44:24 +02:00
Dmitry Shulga
8bcddb02b7 MDEV-24577: Fix warnings generated during compilation of plugin/auth_pam/testing/pam_mariadb_mtr.c on FreeBSD
Compiler warnings generated on building MariaDB server for BSD has the same
reason as in case building is performed on MacOS. Both platforms do use
clang as a C/C++ compiler. So, fix the compiler warnings in case the compiler
is clang doesn't matter what kind of building platform do we use for building.

This is a follow-up patch for the following bug reports:
  MDEV-23564: CMAKE failing due to deprecated Apple GSS method
  MDEV-23935: Fix warnings generated during compilation of
              plugin/auth_pam/testing/pam_mariadb_mtr.c on MacOS
2021-01-19 16:08:46 +07:00
Vladislav Vaintroub
f950559f66 Windows : reduce useless system checks 2020-11-12 21:26:34 +00:00
Marko Mäkelä
533a13af06 Merge 10.3 into 10.4 2020-11-03 14:49:17 +02:00
Oleksandr Byelkin
8e1e2856f2 Merge branch '10.4' into 10.5 2020-11-01 14:26:15 +01:00
Oleksandr Byelkin
80c951ce28 Merge branch '10.3' into 10.4 2020-10-31 21:06:49 +01:00
Marko Mäkelä
898521e2dd Merge 10.4 into 10.5 2020-10-30 11:15:30 +02:00