247 Commits

Author SHA1 Message Date
Markus Makela
d3da98b58f Merge branch 'MXS-544' into develop-MXS-544-merge 2016-03-03 21:39:39 +02:00
Johan Wikman
cb3213af63 server/include/poll.h renamed to server/include/maxscale/poll.h
Due to an include conflict between /usr/include/poll.h and
maxscale/server/include/poll.h the latter was moved to
maxscale/server/include/maxscale/poll.h.

Once 1.4 is out, all maxscale header files will be moved to that
same sub-directory. That will prevent include conflicts and also
make it easy to see which include files belong to maxscale and
which do not.
2016-03-01 12:56:39 +02:00
Markus Makela
bf24f18805 Merge branch 'develop' into MXS-544 2016-02-29 10:40:33 +02:00
counterpoint
5122777829 Try to fix problem if balancing free client DCB and free session so that auth data is always available and client DCB is not freed until session is ready to be freed. Also fix problem in auth logic. 2016-02-24 10:00:45 +00:00
counterpoint
395cbdc103 Simplify handling of "client data" by having a pointer to it only in DCB and not in session structure. Change name of session->client to session->client_dcb for greater clarity. Temporary free of client data in DCB, to be moved to authenticator when it becomes a module. Fix incorrect name of listener_alloc. 2016-02-23 11:13:21 +00:00
counterpoint
ef8a20cceb Fix silly mistakes. 2016-02-22 11:16:51 +00:00
counterpoint
5077933e41 Fix bug in mysql_client.c (over optimisation of protocol setting); various clarifications and improvements re code review. 2016-02-22 11:05:02 +00:00
Markus Makela
a947b33769 MXS-585: Fixed buffer length instead of packet length being used in a calculation
The usage of the buffer length in the authentication success checks causes
the authentication to fail with routers that don't require statement input.
2016-02-18 18:03:21 +02:00
counterpoint
866e91c088 Changes to improve robustness of SSL processing, separate it so far as possible from protocols. Separate the detailed mechanism of authentication from the MySQL protocol with a view to making it into a module later. 2016-02-15 09:29:07 +00:00
counterpoint
971d1d5de2 Redesign logic of SSL connections to work with status in client DCB instead of in the protocol. This eases the way to moving SSL logic out of a specific protocol (currently MySQL) so as to be available across any protocol. Also, some simplification. 2016-02-03 08:54:55 +00:00
counterpoint
8367d93746 Migrate SSL functionality out of service and into listener. Develop config handling accordingly, including making provision for SSL parameters in servers for future use in implementing SSL to backend servers. Some elements still to be tidied mainly in mysql_client.c - but that will be part of detaching the SSL authentication from the MySQL protocol. 2016-01-27 15:46:19 +00:00
counterpoint
e58148356d Split off listener functionality and move SSL initiation from service to listener. Put GWPROTOCOL in its own header file. 2016-01-26 16:08:02 +00:00
counterpoint
5515c71988 Reapply MXS-504 changes subsequent to optimisation changes. Merge SSL processing into non-SSL processing so far as possible, correct usage of OpenSSL, simplify where possible. 2016-01-13 10:08:37 +00:00
Johan Wikman
da29ee0f4a Reformat mysql_client.c 2016-01-12 15:21:33 +02:00
Johan Wikman
a8535f42af Remove all traces of logfile_t
The earlier log file based approach for enabling and disabling
messages has now been completely replaced with the syslog priority
based approach.

Similarly as with log files before it is now possible to enable
and disable a log priority for a particular session, even though
it apparently has not been used much.

The local test-programs of the logging has got minimal attention
only to make them compile. They should get an overhaul as they did
not work before either.
2015-11-23 19:10:53 +02:00
Johan Wikman
453055a6c0 server/modules/protocol: All LOGIFs and skygw_log_writes replaced.
LOGIFs and skygw_log_writes replaced with the equivalent
MXS_[ERROR|WARNING|NOTICE|INFO|DEBUG] macros.
2015-11-17 09:21:47 +02:00
Markus Makela
65e2b50f96 Removed client hangup error message
The error message did not provide any useful information and was most of the
time a false positive due to EPOLL_RDHUP events calling the hangup function
of the DCB.
2015-11-16 13:59:47 +02:00
Johan Wikman
a355e1beef Printf format checking added to logging function.
Printf format checking added to logging function and all
issues that were revealed by that fixed.
2015-11-16 12:40:49 +02:00
counterpoint
49d4a2019e Clarify and fix logic around router capabilities, with particular reference to crash relating to binlog router. 2015-11-11 15:43:23 +00:00
counterpoint
dee20fe077 Merge remote-tracking branch 'origin/develop' into MXS-329-develop-20151111
# Conflicts:
#	server/core/CMakeLists.txt
#	server/core/buffer.c
#	server/core/service.c
#	server/modules/filter/tee.c
#	server/modules/monitor/mysql_mon.c
#	server/modules/routing/binlog/blr.c
#	server/modules/routing/binlog/blr_slave.c
#	server/modules/routing/debugcmd.c
#	server/modules/routing/readwritesplit/readwritesplit.c
#	utils/skygw_utils.cc

- resolved.
2015-11-11 11:08:02 +00:00
Johan Wikman
834a88aeda Log variables moved to log_manager.h
The log manager variables lm_enabled_log_files_bitmask, log_ses_count
and tls_log_info that earlier were declared separately in every
c-file are now declared in the log_manager.h header.
2015-11-04 14:26:53 +02:00
Markus Makela
d57b4cd531 Fix to MXS-54: https://mariadb.atlassian.net/browse/MXS-54
Added a new configuration parameter that allows the user to control
whether authentication warning messages are logged.
2015-11-04 09:18:20 +02:00
Markus Makela
9b4e8223b4 Removed double check of database name on login.
Removed redundant check of the default database when a user with proper
credentials is being authenticated.
2015-11-02 15:54:46 +02:00
Markus Makela
24ee9ca675 Removed redundant log messages
Moved logging from functions that perform user authentication to the code that
uses these functions. This way the messages are only logged once.
2015-11-02 15:53:02 +02:00
counterpoint
cc42707dc0 The read_buffer pointer must be set to null in situations where the buffer has been freed (or consumed). 2015-10-13 15:10:55 +02:00
Markus Makela
4f316419c5 Merge branch 'develop' into MXS-329 2015-09-30 12:47:28 +03:00
Johan Wikman
1e694a6c7d Debug messages logged to debug. 2015-09-25 13:49:30 +03:00
Markus Makela
2dfb9e3c11 Merge branch 'develop' into MXS-329 2015-09-24 17:59:36 +03:00
counterpoint
95a4daecc9 Add GWBUF_POINTER_IN_BUFFER macro; add extra free calls to remove memory leaks. 2015-09-22 11:54:47 +01:00
Markus Makela
11c8ef5b92 Cleaned up code based on the review of the code. 2015-09-21 14:02:01 +03:00
Markus Makela
988a8d7008 Fixed error messages not being printed and cleaned up the function. 2015-09-21 14:02:01 +03:00
counterpoint
c69658889c Handle client input case where no router session exists by sending error message to client. 2015-09-18 08:59:06 +01:00
counterpoint
cfeaf7d6e9 Merge remote-tracking branch 'origin/develop' into MXS-329
Conflicts:
	server/core/session.c
2015-09-10 13:07:27 +01:00
counterpoint
f6916a23bd Move responsibility for closing DCB on error to router error handling. Check that routers remove or disable links to closed DCB. 2015-09-09 09:33:00 +01:00
counterpoint
986c918d52 Remove ERRACT_RESET action from router error handler; remove sole call from mysql_client. Correct comments on parameters for router error handlers. 2015-09-09 08:31:59 +01:00
Johan Wikman
160bbb70ee MXS-251: strerror
Replaces all calls to strerror with calls to strerror_r. The former
is non-thread safe while the latter is.
2015-09-05 15:52:13 +03:00
counterpoint
d74990833b Move capture of user name for persistent connections; expand error message in mysql client to give more information. 2015-09-01 09:59:34 +01:00
counterpoint
a711b25fec Improve user name setting in DCB for persistent connections and to fix bug; change name of session_alloc_dummy to session_set_dummy to be more informative. 2015-08-28 18:20:32 +01:00
counterpoint
068ec77d05 Fix bugs. 2015-08-28 16:44:40 +01:00
counterpoint
9c5f622481 Additional spinlock in random_jkiss. Initial attempt at implementing dummy sessions to provide total consistency - used in mysql_client in relation to authentication - a single static dummy session is used and linked from the client dcb when authentication is not yet complete. 2015-08-28 15:30:06 +01:00
Markus Makela
c6389287ba Fixed TCP_NODELAY being applied to sockets. 2015-07-23 17:59:48 +03:00
Markus Makela
e48b70f62f Fixed memory leaks with SSL connections. 2015-07-23 15:47:48 +03:00
Martin Brampton
bb1f26eda5 Fixes for maintainability of dcb.c; error in persistent connections. 2015-07-19 16:48:24 +01:00
Markus Makela
78eab19c62 Fixed compiler warnings. 2015-07-14 17:13:09 +03:00
Markus Makela
3992f262ca Fixed Coverity defects 2015-07-14 16:17:50 +03:00
Markus Makela
206f93e3ec Fixed missing return values. 2015-07-11 19:02:01 +03:00
Markus Makela
6497350ab7 Merge branch 'release-1.2' into develop
Conflicts:
	server/core/adminusers.c
	server/modules/protocol/mysql_client.c
2015-07-11 17:12:48 +03:00
counterpoint
4f5de063eb Merged dcb_read and dcb_read_n into a single function (dcb_read with an extra parameter). 2015-07-10 15:12:22 +01:00
counterpoint
ba417ef633 Merge remote-tracking branch 'origin/develop' into MXS-122
Conflicts:
	server/core/dcb.c
2015-07-08 14:54:22 +01:00
counterpoint
a72f462e2d Fixes for MXS-196 and other related problems. 2015-07-07 16:57:12 +01:00