Commit graph

221 commits

Author SHA1 Message Date
Jean Flach
e45ede6271 Fix glob error handling
fixes #5859
2017-12-14 17:04:35 +01:00
Gunnar Beutner
1ad83886ac Replace a few more NULLs with nullptr 2017-12-14 15:37:20 +01:00
Gunnar Beutner
96e214221d Remove unused variables 2017-12-14 08:50:09 +01:00
Gunnar Beutner
3c60fbf75d Use std::vector::emplace_back instead of std::vector::push_back 2017-11-30 17:47:09 +01:00
Gunnar Beutner
9ce950b0f1 Replace boost::ref/boost::cref with std::ref/std::cref 2017-11-30 17:47:09 +01:00
Gunnar Beutner
7d7eaa8dd3 Replace boost::thread with std::thread 2017-11-30 17:39:20 +01:00
Gunnar Beutner
858873b940 Replace boost::bind/boost::function with std::bind/std::function 2017-11-27 15:15:11 +01:00
Gunnar Beutner
6f8b62333f Use real UUIDs for Utility::NewUniqueID 2017-11-07 13:53:04 +01:00
Gunnar Beutner
f2d437e96c Implement support for migrating certificates to /var/lib/icinga2/certs
This commit includes documentation too.

Signed-off-by: Michael Friedrich <michael.friedrich@icinga.com>
2017-10-20 14:06:02 +02:00
Edgar Fuß
1fc6d8c899 Fix for traditional glob(3) behaviour
fixes #4778
2017-02-09 09:08:48 +01:00
Edgar Fuß
7414df4ef8 Fix lsb_release/sw_vers errors on NetBSD
fixes #4779
2017-02-08 17:47:09 +01:00
Michael Friedrich
b7caf0820d Ensure that *.icinga.com is used everywhere
fixes #13897
fixes #13277
2017-01-10 17:19:12 +01:00
Gunnar Beutner
288413f046 Replace BOOST_FOREACH with range-based for loops
fixes #12538
2016-08-25 06:46:17 +02:00
Gunnar Beutner
aeaca5e803 Revert "Fix incorrect detection of the 'Concurrency' variable"
This reverts commit 585f0537d2.

refs #12456
2016-08-19 11:58:52 +02:00
Gunnar Beutner
585f0537d2 Fix incorrect detection of the 'Concurrency' variable
fixes #12456
2016-08-17 09:20:05 +02:00
Rune Darrud
5c0b3c58bd Do not escape backslashes and separators twice
fixes #12227

Signed-off-by: Gunnar Beutner <gunnar.beutner@netways.de>
2016-08-17 06:10:41 +02:00
Timo Buhrmester
148b4da285 Don't violate POSIX by ensuring that the argument to usleep(3) is less than 1000000
fixes #12391

Signed-off-by: Gunnar Beutner <gunnar.beutner@netways.de>
2016-08-10 12:29:52 +02:00
Markus Frosch
a5abe1a972 Allow debugging of Utility::GetTime
So we can run unit tests that expect a certain behavior based on time.

When Icinga 2 is compiled with I2_DEBUG one can use Utility::SetTime to
override the current system time, and lock it to this value.

fixes #11875
2016-06-09 14:25:51 +02:00
Gunnar Beutner
eab2fb79ad Fix crash in UnameHelper()
fixes #11714
2016-05-10 09:46:48 +02:00
Gunnar Beutner
327d12295c Implement support for upgrading NSIS-based installations
refs #11449
2016-04-01 08:42:58 +02:00
Gunnar Beutner
6bf3225e84 Implement support for running custom install/uninstall actions
refs #11449
2016-03-31 14:53:54 +02:00
Gunnar Beutner
016f47d6e6 Fix Utility::MkDirP on Windows
fixes #11455
2016-03-29 09:44:05 +02:00
Gunnar Beutner
71060be89a Follow symlinks in Utility::GlobRecursive
fixes #11347
2016-03-22 08:22:11 +01:00
Michael Friedrich
65cbf04454 Fix: MkDirP supports '/' and '\' on Windows
fixes #10231
2016-03-07 09:22:07 +01:00
Michael Friedrich
d14477c242 Fix MkDirP() on Windows
fixes #10231
2016-03-03 15:54:35 +01:00
Michael Friedrich
47c5425137 Fix permissions for temporary files
fixes #11212
fixes #11211
2016-02-24 11:00:44 +01:00
Michael Friedrich
4cb5b97e52 Fix unique creation of temp files
fixes #10948
2016-02-23 12:30:59 +01:00
Michael Friedrich
627814b8e7 Fix incorrect --version information
fixes #10784
2016-01-26 15:17:48 +01:00
Gunnar Beutner
599929b0f6 Update copyright headers for 2016 2016-01-12 08:29:59 +01:00
Gunnar Beutner
fba0b493cd Make sure that all strings in the IDO database are UTF8-encoded
fixes #10554
2015-12-10 12:26:19 +01:00
Michael Friedrich
2a5a9d2f4b Fix missing path in mkdir() exception
fixes #10748
2015-11-30 10:37:57 +01:00
Gunnar Beutner
3916ef0904 Build fix for Windows
refs #10693
2015-11-26 11:18:05 +01:00
Gunnar Beutner
2320f7a32a Implement Platform* global variables
refs #10693
2015-11-23 13:10:25 +01:00
Gunnar Beutner
eb67f3779f Fix incorrect error messages on Windows
fixes #10637
2015-11-15 21:18:27 +01:00
Gunnar Beutner
9ea51aa86e Use non-blocking open() for the command pipe
fixes #10410
2015-11-09 20:39:26 +01:00
Gunnar Beutner
5aa91551a5 Improve validation for CIDR masks
fixes #10375
2015-10-19 10:40:48 +02:00
Thomas Gelf
29188a4a10 Improve error handling in cidr_match function
refs #10354

Signed-off-by: Gunnar Beutner <gunnar@beutner.name>
2015-10-14 12:23:59 +02:00
Gunnar Beutner
06a0f182a5 Implement the cidr_match function
fixes #10354
2015-10-14 10:14:01 +02:00
Gunnar Beutner
2484016c54 Fix crash in RepositoryUtility::AddObject
fixes #10326
2015-10-13 09:15:06 +02:00
Gunnar Beutner
254c076dd4 Fix incorrectly escaped arguments for CreateProcess
fixes #10245
2015-09-30 10:56:31 +02:00
Michael Friedrich
7eca257784 Fix return value of Utility::MkDir/MkDirP
None as there are exceptions thrown.

fixes #9689
2015-08-24 15:11:49 +02:00
Gunnar Beutner
b43a3135cc Fix: Utility::Glob on Windows doesn't support wildcards in all but the last path component
fixes #9962
2015-08-19 07:54:06 +02:00
Michael Friedrich
fca7a33aac Implement config file management for the API
refs #9083

fixes #9102
fixes #9103
fixes #9104

fixes #9705
2015-07-23 17:57:24 +02:00
Michael Friedrich
59b81168ff Add exceptions for Utility::MkDir{,P}
fixes #9689
2015-07-21 15:56:57 +02:00
Jean-Marcel Flach
a98d2f585d Implement URL parser
fixes #9470
2015-07-07 15:33:19 +02:00
Gunnar Beutner
cfcb8675c7 Fix unexpected exception in Utility::DirName when specifying an empty path
refs #9263
2015-06-15 14:04:38 +02:00
Gunnar Beutner
3e08f2e0b5 Make order for deferred initializers deterministic
refs #8791
2015-03-18 13:24:31 +01:00
Gunnar Beutner
2867d79514 Add VERIFY check in Utility::ExecuteDeferredInitializers
Coverity Bug ID: 1167738
2015-03-03 09:26:21 +01:00
Gunnar Beutner
3e12bfef25 Remove redundant error check in Utility::GetTime
Coverity Bug ID: 1167732
2015-03-03 09:23:29 +01:00
Gunnar Beutner
7c31654552 Remove the return type for Utility::LoadExtensionLibrary 2015-03-03 07:19:34 +01:00
Michael Friedrich
24852e05c7 Move ValidateMacroString into the MacroProcessor class
refs #7311
2015-02-11 16:14:59 +01:00
Michael Friedrich
8ca57cba03 Add macro config validator for command args, env, custom attr, perfdata templates
fixes #7311
2015-02-11 15:32:10 +01:00
Michael Friedrich
78bfd0204c Update copyright year 2015-01-22 12:00:23 +01:00
Gunnar Beutner
a9e2bc4b40 Implement a way to call methods on objects
fixes #8071
2014-12-11 21:12:34 +01:00
Gunnar Beutner
c1ac548a77 Escape special characters in repository file names
fixes #7618
2014-12-10 13:20:16 +01:00
Gunnar Beutner
e4bfb5f922 Fix static initializers for Utility::AddDeferredInitializer
fixes #7646
2014-11-12 08:00:56 +01:00
Gunnar Beutner
064407d3c9 Fix dynamic_cast problem
fixes #7586
2014-11-06 09:05:12 +01:00
Gunnar Beutner
4677014b6d Implement support for arrays in custom variables
fixes #6544
2014-11-02 07:27:50 +01:00
Michael Friedrich
3709ec73ea Add Utility::SetFileOwnership() on Linux
refs #7476
2014-10-30 19:52:22 +01:00
Michael Friedrich
4fe486c4dd Cli: Fix overwriting api.conf; Move black/whitelist functionality into AgentUtility class
refs #7253
fixes #7481
2014-10-29 19:21:52 +01:00
Gunnar Beutner
ceca27e25b Fix Utility::GetFQDN() on OS X
fixes #7495
2014-10-29 16:54:33 +01:00
Gunnar Beutner
3f032692ce Implement agent settings for "agent set" and "agent list"
refs #7248
2014-10-27 15:12:19 +01:00
Michael Friedrich
9227d990dc Add Utility::CopyFile()
refs #7423
2014-10-22 19:25:29 +02:00
Gunnar Beutner
2d5e9514a5 Refactor logging code 2014-10-19 17:52:17 +02:00
Gunnar Beutner
b18f57a745 Remove logger_fwd.hpp 2014-10-19 14:50:39 +02:00
Gunnar Beutner
a4081f1445 Implement support for CLI commands
fixes #7246
2014-10-08 15:33:10 +02:00
Gunnar Beutner
ac32d4b382 Improve thread spawning behavior
fixes #7186
2014-09-11 11:45:21 +02:00
Gunnar Beutner
6f2ea6bc08 Fix build problems with Oracle Solaris Studio
refs #6896
2014-09-02 13:09:17 +02:00
Gunnar Beutner
65bec9e904 Clean up some parts of the code 2014-08-17 17:57:41 +02:00
Gunnar Beutner
39248dad42 Build fix for Windows 2014-08-07 14:23:20 +02:00
Jan Andres
46dbe5a4f5 Fix incorrect usage of readdir_r
refs #6821

Signed-off-by: Gunnar Beutner <gunnar.beutner@netways.de>
2014-08-04 08:49:04 +02:00
Jan Andres
20fc8773b6 Build fix for Solaris
refs #6821

Signed-off-by: Gunnar Beutner <gunnar.beutner@netways.de>
2014-08-04 08:49:04 +02:00
Gunnar Beutner
ad1a11f882 Remove source line information from stacktraces
fixes #6576
2014-06-25 09:18:53 +02:00
Michael Friedrich
1eb77b0cd7 Replace recursive implementation with a forward loop in Utility::MkDirP()
That way we always move into the tree, but not start in the deepest
level and may limit the tree level too in the future, if required.

Solves the Win32 implementation by moving the general mkdir() call into
Utility::MkDir().

refs #6328
2014-06-13 09:10:35 +02:00
Michael Friedrich
2acf6a063e Fix syncing zones.d from etc/ to var/lib in a recursive manner
Missing mkdir -p basically. Introducing Utility::MkDirP() which still
requires Win32 implementation.

refs #6328
2014-06-12 23:28:46 +02:00
Michael Friedrich
09ad04b09a Error messages: Use strerror() for message formatting.
Refs #6070
2014-06-05 17:45:02 +02:00
Michael Friedrich
f1e77a0579 Error Messages: Deal with socket exceptions.
Refs #6070
2014-06-05 14:36:50 +02:00
Michael Friedrich
076d297931 Change log message identifier for libbase.
Refs #6346
2014-05-28 14:42:00 +02:00
Gunnar Beutner
7f5d8a36b4 Split Utility::GetHostName into two functions.
Fixes #6312
2014-05-27 10:20:33 +02:00
Gunnar Beutner
3f2df5b656 Make sure that Utility::GetHostName() returns an FQDN.
Fixes #6312
2014-05-26 17:32:18 +02:00
Gunnar Beutner
632026cd9f Rename C++ header files.
Fixes #6291
2014-05-25 16:27:14 +02:00
Gunnar Beutner
1bc1356fe6 Windows build fix. 2014-05-22 21:32:08 +02:00
Gunnar Beutner
46165dbccf Make sort order for Utility::{Glob,GlobRecursive} deterministic.
Fixes #5854
2014-05-22 13:12:58 +02:00
Gunnar Beutner
b2246f3af9 Build fix for Windows.
Refs# 6191
2014-05-17 08:38:28 +02:00
Gunnar Beutner
3a1ce23aeb Implicitly set zone attribute for files includes from zones.d.
Refs #6191
2014-05-13 14:40:12 +02:00
Gunnar Beutner
9c3e399188 Remove unnecessary includes.
Fixes #6189
2014-05-11 18:11:32 +02:00
Gunnar Beutner
c7b5e4c31e Fix some compiler warnings.
Refs #5823
2014-05-11 06:04:43 +02:00
Gunnar Beutner
45270f1bb8 Refactor the agent and cluster components.
Refs #6107
2014-05-08 09:13:04 +02:00
Gunnar Beutner
0571d8a464 Run INITIALIZE_ONCE() after static initializers.
Refs #6107
2014-05-08 09:13:04 +02:00
Gunnar Beutner
b119c3285b Change log level for some messages.
Fixes #6072
2014-04-29 11:01:28 +02:00
Gunnar Beutner
ea24147d0d Add uptime information to the "icinga" check type.
Fixes #6064
2014-04-28 09:23:52 +02:00
Gunnar Beutner
e19948fc95 Add agent setup wizard for Windows.
Refs #4865
2014-04-18 12:39:50 +02:00
Gunnar Beutner
0fb55f3404 Fix NSIS installer and Windows service.
Refs #4865
2014-04-18 12:15:01 +02:00
Gunnar Beutner
70062b5884 Make sure that Utility::GlobRecursive doesn't recurse into . and ..
Fixes #5946
2014-04-05 23:23:42 +02:00
Gunnar Beutner
04dcceef59 Implement Utility::GetSymbolName and Utility::GetSymbolSource for Windows.
Refs #5870
2014-03-30 01:20:58 +01:00
Gunnar Beutner
27955843c0 Move Addr2Line function to the Utility class.
Refs #5846
2014-03-23 19:39:25 +01:00
Michael Friedrich
ce737ff2f3 Change copyright header (again).
Fixes #5424
2014-03-19 11:42:47 +01:00
Michael Friedrich
7d9dc1a36b Fix including a non-existing directory exception requires path information.
Fixes #5618
2014-02-07 13:23:26 +01:00
Michael Friedrich
1e0a11c7f2 Add IcingaNodeName script variable, set as check source (WIP).
Fixes #5471
Fixes #5473
2014-02-06 15:38:06 +01:00
Gunnar Beutner
984ffb7421 Fix memory leak in Utility::GlobRecursive.
Fixes #5604
2014-02-05 13:53:56 +01:00