Alexander Aleksandrovič Klimov
0ee93754ee
Merge pull request #8691 from Icinga/bugfix/retry-rename-on-windows
...
Retry file rename operations on Windows for some errors
2021-03-26 17:16:25 +01:00
Alexander Aleksandrovič Klimov
65a77d4955
Merge pull request #8702 from Icinga/bugfix/missing-iostream-include
...
Add missing #include <iostream>
2021-03-26 17:16:01 +01:00
Julian Brost
8813b74c9f
Merge pull request #8693 from Icinga/bugfix/stringbuilder-malloc
...
PackObject(): avoid one malloc()
2021-03-25 18:02:12 +01:00
Julian Brost
b34818d3fc
Add missing #include <iostream>
...
Fixes the following build error:
/home/jbrost/dev/icinga2/lib/base/stdiostream.cpp: In member function ‘virtual size_t icinga::StdioStream::Read(void*, size_t, bool)’:
/home/jbrost/dev/icinga2/lib/base/stdiostream.cpp:28:15: error: invalid use of incomplete type ‘std::iostream’ {aka ‘class std::basic_iostream<char>’}
28 | m_InnerStream->read(static_cast<char *>(buffer), size);
| ^~
2021-03-25 11:30:02 +01:00
Alexander A. Klimov
9531de3835
JsonEncode(): serialize integers w/o trailing .0
...
... so Icinga DB can parse them as integers.
2021-03-23 17:52:37 +01:00
Alexander A. Klimov
070b4f9d06
Drop StringBuilder
2021-03-23 13:13:47 +01:00
Alexander A. Klimov
f89f35c798
PackObject(): avoid one malloc()
...
... for performance reasons.
2021-03-23 13:13:47 +01:00
Julian Brost
05c8e7f36f
Retry file rename operations on Windows for some errors
2021-03-23 09:54:01 +01:00
Julian Brost
2a2229a49b
Don't use sprintf for SHA1 to hex conversion
2021-03-19 10:31:01 +01:00
Alexander Aleksandrovič Klimov
ef8619f76b
Merge pull request #8601 from Icinga/feature/replace-std-boost-bind-with-lambdas-7006
...
Feature: Replace std/boost::bind() with lambdas
2021-03-18 17:56:13 +01:00
Yonas Habteab
43ba2da39c
Replace std/boost::bind() function with lambda expression
2021-03-10 16:29:40 +01:00
Alexander Aleksandrovič Klimov
aa0baf6f69
Merge pull request #8099 from Icinga/feature/std-mutex
...
Use std::mutex, not boost::mutex
2021-02-04 10:19:04 +01:00
Alexander A. Klimov
9154aa17eb
Fix missing include
2021-02-03 09:54:57 +01:00
Alexander A. Klimov
c3388e9af6
Use std::mutex, not boost::mutex
2021-02-03 09:54:57 +01:00
Alexander Aleksandrovič Klimov
dbdfe189c0
Merge pull request #7092 from Icinga/bugfix/command-escape-windows-4849
...
Fix Windows command escape for \"
2021-02-01 11:20:44 +01:00
Alexander Aleksandrovič Klimov
91ffa89dad
Merge pull request #7918 from Icinga/feature/check-timeouts-sigterm-6162
...
On check_timeout first send SIGTERM
2021-01-21 16:11:07 +01:00
Alexander Aleksandrovič Klimov
4063e39d5f
Merge pull request #8515 from Icinga/feature/update-ssl-context-after-accepting-new-connection-8501
...
API: Update the ssl context after each accepting incoming connection
2021-01-15 11:21:36 +01:00
Yonas Habteab
057254695d
Utility: Introduce new helper function Utility::GetFileCreationTime()
2021-01-14 18:39:14 +01:00
Alexander Aleksandrovič Klimov
70b438a2bf
Merge pull request #8104 from Icinga/bugfix/remove-downtime-returns-wrong-status-7408
...
API: Display a correct status when removing a downtime
2021-01-14 17:49:00 +01:00
Alexander A. Klimov
e1bc4d474f
On check_timeout first send SIGTERM
...
... to allow check plugins to terminate gracefully.
refs #6162
2021-01-14 12:00:11 +01:00
Julian Brost
f12666c166
Merge pull request #8157 from Icinga/bugfix/temporary-files-5124
...
Clean up temp files
2021-01-13 15:45:29 +01:00
Alexander A. Klimov
450b2117d2
Add ".tmp" to state and modified attributes temp files
...
refs #5124
2021-01-12 17:35:29 +01:00
Alexander A. Klimov
18c2dae941
Clean up temp files
...
refs #5124
2021-01-12 17:35:29 +01:00
Alexander A. Klimov
26c944125b
Close FDs based on /proc/self/fd
...
... not to waste time with close(2)ing RLIMIT_NOFILE-3 non-existing FDs.
Newer kernel = higher RLIMIT_NOFILE = more time wasted
refs #8437
2021-01-12 17:32:28 +01:00
Benedikt Heine
8a455e8150
Fix typo seemless -> seamless
2020-12-25 23:27:08 +01:00
Julian Brost
00d8703aad
Merge pull request #7847 from Icinga/feature/log-trim-trailing-newlines-7828
...
Log: trim trailing newlines
2020-12-23 14:20:43 +01:00
Julian Brost
eab07a7318
Provide a conversion function from icinga::String to boost::string_view
...
Boost.Beast changed the signature of
boost::beast::http::basic_fields::set in version 1.74 so that no longer
allows passing an icinga::String instance as value. This adds a
conversion function so that it works again.
2020-12-22 16:27:38 +01:00
Noah Hilverling
f7e368564f
Merge pull request from GHSA-pcmr-2p2f-r7j6
...
Verify certificates against CRL before renewing them (2.13)
2020-12-15 12:30:19 +01:00
Alexander Aleksandrovič Klimov
6b04ef6e5d
Merge pull request #7871 from Icinga/feature/more-uoms-for-perfdata-7225
...
PerfdataValue: add UoMs
2020-12-14 18:42:49 +01:00
Alexander Aleksandrovič Klimov
366a97bf19
Merge pull request #8541 from Icinga/bugfix/openssl-error-buffer
...
Use proper buffer size for OpenSSL error messages
2020-12-09 16:08:19 +01:00
Julian Brost
e86bd24348
Verify certificates against CRL before renewing them
...
When a CRL is specified in the ApiListener configuration, Icinga 2 only
used it when connections were established so far, but not when a
certificate is requested. This allows a node to automatically renew a
revoked certificate if it meets the other conditions for auto-renewal
(issued before 2017 or expires in less than 30 days).
2020-12-09 12:10:59 +01:00
Julian Brost
bbfd1ecfc8
Use ERR_error_string_n() instead of ERR_error_string()
...
Explicitly pass the actual length of the buffer to avoid overflows.
2020-12-08 13:08:18 +01:00
Julian Brost
c0fc9a86c5
Increase size of buffer for OpenSSL error messages
...
According to man 3 ERR_error_string, "buf must be at least 256 bytes
long", therefore increase the buffer size to 256 everywhere.
2020-12-08 13:08:18 +01:00
Julian Brost
61d7ec4bf7
Remove std::string to_string(const errinfo_openssl_error& e)
...
The function was never used and it's implementation contains a bug where
a buffer of too small size is used as a paramter to ERR_error_string.
According to the `man 3 ERR_error_info`, the buffer has to be at least
256 bytes in size.
Also the function seems of limited use as it allows to output the tag
object used with additional error information for exceptions in Boost.
However, you boost::get_error_info<>() just returns the value type but
not the full tag object from the exception.
2020-12-08 13:05:38 +01:00
Yonas Habteab
dd02e3b6d8
API: Display a correct status code when removing a scheduled downtime
2020-12-07 13:19:41 +01:00
Alexander A. Klimov
b8bb8cb946
Configuration.ApiBindHost: default to ::
...
refs #8183
2020-12-04 16:52:58 +01:00
Alexander Aleksandrovič Klimov
bee4ac7f7c
Merge pull request #8040 from Icinga/feature/v1-actions-execute-command-8034
...
Add API endpoint: /v1/actions/execute-command
2020-12-02 10:53:24 +01:00
Julian Brost
3f15963651
Remove SpinLock
...
No longer needed as its only user now uses std::mutex.
2020-11-17 09:40:34 +01:00
Julian Brost
4c8c4c75ec
Add Process::WaitForResult to allow waiting for the process to finish
2020-11-16 17:10:26 +01:00
Alexander Aleksandrovič Klimov
5f3b5934fa
Merge pull request #8195 from Icinga/feature/terminate-pretty-json-output-w-n-8194
...
JsonEncode(): suffix pretty JSON w/ \n
2020-11-13 17:08:46 +01:00
Alexander Aleksandrovič Klimov
9c232e942b
Merge pull request #8085 from Icinga/bugfix/not-set-lcnumeric-twice-7563
...
Fix LC_NUMERIC set twice and use a wrong value
2020-10-29 16:47:43 +01:00
Alexander Aleksandrovič Klimov
b5b1ee715b
Merge pull request #8184 from sbraz/boost
...
Fix ‘fs::copy_option’ has not been declared with boost 1.74.0
2020-10-29 16:19:07 +01:00
Alexander A. Klimov
bb851b0558
Merge branch 'master' into feature/v1-actions-execute-command-8034
2020-10-28 18:37:08 +01:00
Julian Brost
c30d8ff373
Remove Utility::GetEnv from header
...
It is never used and not even implemented anywhere, probably a leftover.
2020-10-20 12:19:15 +02:00
Alexander Aleksandrovič Klimov
a32c1bf910
Merge pull request #7864 from Icinga/bugfix/icinga2-doesn-t-close-connections-7203
...
Add timeout for boost::asio::ssl::stream#async_shutdown()
2020-10-19 15:25:12 +02:00
Alexander Aleksandrovič Klimov
72c67fc065
Merge pull request #8370 from Icinga/bugfix/reload-hang-8173
...
Application#RunEventLoop(): don't wait for the thread pool to stop on shutdown
2020-10-14 18:11:23 +02:00
Alexander A. Klimov
4af450141b
Introduce SpinLock
2020-10-14 10:47:08 +02:00
Henrik Triem
3c556350c8
WorkQueue: Allow choosing stats log level
2020-09-22 13:44:02 +02:00
Alexander A. Klimov
d69c6879fa
Application#RunEventLoop(): don't wait for the thread pool to stop on shutdown
...
refs #8173
2020-09-03 14:04:42 +02:00
Alexander A. Klimov
3adba5c542
JsonEncode(): suffix pretty JSON w/ \n
...
refs #8194
2020-09-02 16:11:43 +02:00