18 Commits

Author SHA1 Message Date
Johan Wikman
dbc321df9b Fix coverity report of externcmd.c
Buffer overwrite.
2015-12-08 09:32:10 +02:00
Johan Wikman
bd94d8967a Reindented server/core/externcmd.[c|h]
Reindented server/core/externcmd.[c|h] and added copyright
message.
2015-11-30 12:42:49 +02:00
Markus Makela
230978f6db Added missing logging to externcmd.c
Not all failures caused an error to be logged.
2015-11-27 12:32:27 +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
Johan Wikman
44df53d846 LOGIF and skygw_write_log removed from server/core/*.c
LOGIF and skygw_write_log removed from server/core/*.c and
replaced with calls to MXS_(ERROR|WARNING|NOTICE|INFO|DEBUG).
This is a mechanism change, no updating of the actual message
has been performed.

Currently this causes a very small performance hit, since the
check whether the priority is enabled or not is performed in
the function that is called and not before the function is called.
Once all LOGIFs and skygw_write_logs have been replaced, the
behaviour will be altered back to what it was.
2015-11-16 09:49:12 +02:00
Markus Makela
e37ba0a63d Fixed build failures due to conflicts
Due to an odd rebase, a conflict was left in externcmd.c
2015-11-11 21:38:37 +02:00
Markus Makela
ba9da9ae3d Fixed invalid EXTERNCMD allocation
externcmd_allocate now returns either a valid EXTERNCMD or NULL.
2015-11-11 21:26:10 +02:00
Markus Makela
2d600868f5 Added argument substitution to monitor scripts 2015-11-11 21:19:07 +02:00
Markus Makela
466224b316 Moved common monitor code to externcmd.c
File existence and permission checks are now done in externcmd_can_execute
2015-11-11 21:19:07 +02:00
Markus Makela
d56843835c Cleaned up externcmd_allocate and externcmd_free 2015-11-11 21:19:07 +02:00
Markus Makela
c5c416e7fe Fixed modification of parameters
Monitor parameters were being modified in externcmd_allocate which caused truncation
of the arguments to the commands.
2015-11-11 18:01:09 +02: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
3b0b740e47 Fixed monitor scripts and added extra logging. 2015-09-11 18:49:20 +03: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
Markus Makela
3e863863dd Fixes to Coverity defects. 2015-08-26 09:35:10 +03:00
Markus Makela
7dbc021149 Added more logging when a monitor script cannot be executed. 2015-05-20 16:16:49 +03:00
Markus Makela
b815a79628 Fixed failing execvp calls leaving a process running. 2015-05-20 13:06:08 +03:00
Markus Makela
a73df62ebd Renamed mon_exec files to externcmd. 2015-05-18 18:34:43 +03:00