1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-09-11 08:30:59 +03:00
Commit Graph

92 Commits

Author SHA1 Message Date
Georg Richter
8581cafad4 Fix for CONC-494:
Install all symlinks for shared and static libraries in
component Development instead of SharedLibraries.
2020-09-09 10:24:55 +02:00
Georg Richter
37a4fd1d6d Workaround for CONC-469
If no default authentication plugin was specified and the server sends preferred
authentication method in server hello package client now uses servers preferred
authentication method instead of using mysql_native_password. If no default
authentication plugin was specified and the server didn't send an
authenticatoin method client uses the default mysql_native_password plugin.
2020-05-25 11:50:04 +02:00
Oleksandr Byelkin
328580aab1 Because the function strncpy() will not ensure that the destination
string will be terminated by the NUL character, it is best to do that
externally in the caller. This code was originally introduced in
commit beb9d5ea89.
(patch by Marko)
2020-03-11 08:12:53 +01:00
Georg Richter
1218ffac1a Fix for CONC-452 and CONC-453:
Various coverity scan fixes, including CONC-452 and CONC-453.
Special thanks to Lukas Javorsky for fixing numerous covscan
issues (This patch includes part of his pull request #126).

Coverity scan build was using the following cmake parameters:
-WITH_EXTERNAL_ZLIB=ON -DWITH_UNIT_TESTS=OFF.

CWE-416 (use after free) in dtoa.c (from netlib) is still open.
2020-02-14 09:52:21 +01:00
Georg Richter
b5bd0e5818 Merge commit '77d051e89d0b342333d951e66e53f2aea43f6e36' into 3.1 2019-07-16 17:33:00 +02:00
Georg Richter
dc0f66f006 Post fix for CONC-345: removed semicolon 2019-07-05 14:09:00 +02:00
Georg Richter
0f4891359a Fix for CONC-345: heap-use-after-free in client_mpvio_read_packet
Kudos to Kentoku Shiba
2019-07-05 11:42:12 +02:00
Georg Richter
af47d1beab Merge branch '3.0' into 3.1 2019-03-03 14:03:20 +01:00
Sergei Golubchik
beb9d5ea89 MDEV-11340 Allow multiple alternative authentication methods for the same user
continue the authentication if the auth plugin is not found,
perhaps the next plugin in the chain will work.
2019-02-04 16:07:05 +01:00
Sergei Golubchik
1e4b08bd29 MDEV-11340 Allow multiple alternative authentication methods for the same user
expect multiple plugin restarts within a single authentication
2019-02-04 16:06:47 +01:00
Georg Richter
1788e000d2 Fix for CONC-332:
mysql_change_user doesn't reset server status

Fixed my_auth.c, after successful connect the server status package information (including session change information) must be updated.
2018-07-27 07:17:27 +02:00
Georg Richter
a0d4b422bd Fix for CONC-345: heap-use-after free in client_mpvio_read_packet
We need to check if pkt_len is > 0 before the buffer content will be checked.
2018-07-03 11:17:46 +02:00
Georg Richter
638f2aa8dd Revert "Fix for CONC-332:"
This reverts commit 0c29fdbbb3.
The fix breaks kill test in mtr (Windows).
2018-05-18 12:24:56 +02:00
Georg Richter
0c29fdbbb3 Fix for CONC-332:
After calling mysql_real_connect or mysql_change_user the server_status was
not updated, since run_plugin_auth didn't read the entire OK packet.
2018-05-17 07:10:15 +02:00
luz.paz
b2e6ed0295 Fixes misc. typos
found via `codespell -q 3`
2018-04-13 07:30:23 +02:00
Georg Richter
50d48e91fa Reworked plugin interface
Plugin configuration happens now in CMakeLists.txt files in corresponding plugin directories.

plugins.cmake now contains REGISTER_PLUGIN_FUNCTION which accepts the following parameters:
  - TARGET: the name of the plugin (dynamic plugins will be named ${TARGET}.so (or .dll)
  - SOURCES: source files
  - LIBRARIES: additional libraries for linking
  - INCLUDES: include directories
  - CONFIGURATIONS: possible plugin configurations: valid arguments are DYNAMIC, STATIC, OFF
  - DEFAULT: default configuration (see CONFIGURATIONS)
  - COMPILE_OPTIONS: compiler flags

The default plugin configuration can be specified via cmake parameter -DCLIENT_PLUGIN_${TARGET}=[DYNAMIC|STATIC|OFF]
2018-04-07 07:14:43 +02:00
Georg Richter
c9c40a37a4 TLS/SSL fixes:
- don't run fingerprint and passphrase protected tests if the corresponding
  files (sha1 and encrypted client key) are not found in CERT_PATH
- don't overwrite SSL errors if handshake failed
- Use gnutls read/write instead of pvio
2018-01-10 11:11:02 +01:00
Georg Richter
08450df078 initial implementation for MDEV-12471 2017-04-24 15:45:58 +02:00
Georg Richter
967b2830d8 renamed ma_errmsg.h back to errmsg.h 2016-11-16 18:13:59 +01:00
Georg Richter
9f88e25fd6 Compiler warning fixes 2016-09-03 12:46:50 +02:00
Georg Richter
429b166cbe Move mariadb specific client flags and server capabilities to mysql->extension 2016-08-16 14:58:15 +02:00
Georg Richter
bea035a72b - Unittests: link static library instead of dynamic
- TLS/SSL: renamed HAVE_SSL to HAVE_TLS to avoid trouble in
  10.2-integration
- Fixed wrong timeout in non-blocking mode
- Fixed valgrind error in prepared statement
2016-03-28 10:29:55 +02:00
Georg Richter
4b1e94bccc Since we use TLS and not SSL functions and structures were renamed
from SSL to TLS
2016-03-16 18:20:08 +01:00
Georg Richter
4e31be7766 Fixed possible buffer overrun in authentication 2016-03-11 10:28:59 +01:00
Georg Richter
8620b754ea Added missing error messages for wrong protocol
moved connection handler into net->extension (ABI break)
2016-02-23 13:50:14 +01:00
Georg Richter
d68b48f954 10.2 integration fixes
- changed plugin API to avoid crashes: Oracle/MariaDB changed
    structure several times without updating interface version.
  - ABI fixes: moved additional net items to net->extension (connection
    handler and com_multi buffer)
2016-02-22 11:37:13 +01:00
Georg Richter
dc1a8715c2 CONC-161: Increase username length to 128 2016-02-21 17:48:33 +01:00
Georg Richter
c014b9f6ae 10.2 integration fixes:
- renamed/prefixed password functions
- prepared statement fixes for mysql_client_test
2016-02-19 22:23:00 +01:00
Georg Richter
d303cf76a7 More 10.2-integ fixes:
- renamed my_net functions (ma_net)
- fixed wrong types in ma_schannel.c
- fixed wrong parameter in client_plugin when building load string
2016-02-17 10:00:53 +01:00
Georg Richter
4ca933bb81 Global cleanup:
removed global locks
  removed dead code and files
  removed dbug
2016-02-08 18:43:02 +01:00
Georg Richter
ad58fa7868 More cleanup for 10.2 integration 2016-02-04 13:11:44 +01:00
Georg Richter
79d0b2946b More 10.2 fixes for integration 2016-02-03 11:53:39 +01:00
Georg Richter
c5ca735dd3 Renamed prefixes for 10.2 integration 2016-02-02 12:12:04 +01:00
Georg Richter
8845fcb7ce First implementation of mariadb_stmt_execute_direct 2016-01-28 16:58:30 +01:00
Georg Richter
c8648cf4b2 Initial implementation for COM_MULTI 2015-12-17 19:21:52 +01:00
Georg Richter
955bb8d6ff 10.2 protocol fixes: exclude trailing 0 when checking for RPL_HACK in
version number.
Shift extended client flags up instead of down
2015-11-20 19:20:22 +01:00
Georg Richter
5fca34186f Initial implementation for MDEV-9117: 10.2 protocol changes - exchanging
mariadb specific client/server capabilities during handshake
2015-11-20 18:34:35 +01:00
Georg Richter
9b1cbf15a5 Fix for asynchronous connect:
Unless the connection was successfully established mysql_get_socket will
return INVALID_SOCKET. In this case we need to check if an asynchronous
operation is in progress and return pvio from asynchronous context.
2015-11-15 08:00:43 +01:00
Georg Richter
dd29c4abec Renamed MYSQL_COM_* to COM_
changed default schema for tests to test_c
2015-11-02 15:19:10 +01:00
Georg Richter
630d742b89 Last push was incomplete, it contained only new file (old_password.c) 2015-11-02 14:58:04 +01:00
Georg Richter
7500f37150 - Renamed cio to pvio (pluggable virtual IO)
- minor fixes in windows schannel
2015-10-27 10:24:48 +01:00
Georg Richter
7609cbe121 - Changed plugin configuration for cmake
- Fixed/finished shared memory plugin for windows
2015-10-02 10:05:41 +02:00