summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.rst5
-rw-r--r--CMakeLists.txt6
-rw-r--r--CONTRIBUTING.rst8
-rw-r--r--doc/biboumi.1.rst8
-rw-r--r--packaging/biboumi.spec.cmake7
-rw-r--r--src/main.cpp2
-rw-r--r--src/xmpp/biboumi_adhoc_commands.cpp3
-rw-r--r--tests/end_to_end/__main__.py3
8 files changed, 31 insertions, 11 deletions
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index cd7c4a1..d6b214a 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -1,3 +1,8 @@
+Version 9.0
+===========
+
+- SIGHUP is now caught and reloads the configuration like SIGUSR1 and 2.
+
Version 8.2 - 2018-05-23
========================
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 26f2f11..1d57a0b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,9 +2,9 @@ cmake_minimum_required(VERSION 3.0)
project(biboumi)
-set(${PROJECT_NAME}_VERSION_MAJOR 8)
-set(${PROJECT_NAME}_VERSION_MINOR 2)
-set(${PROJECT_NAME}_VERSION_SUFFIX "")
+set(${PROJECT_NAME}_VERSION_MAJOR 9)
+set(${PROJECT_NAME}_VERSION_MINOR 0)
+set(${PROJECT_NAME}_VERSION_SUFFIX "~dev")
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index 8df4899..502acdc 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -20,8 +20,12 @@ If the bug you’re reporting is about a bad behaviour of biboumi when some XMPP
or IRC events occur, please try to reproduce the issue with a biboumi running
in log_level=0, and include the relevant logs in your bug report.
-If the issue you’re reporting may have security implications, please select
-the “confidential” flag in your bug report.
+If the issue you’re reporting may have security implications, please
+select the “confidential” flag in your bug report. This includes, but is not limited to:
+
+- disclosure of private data that was supposed to be encrypted using TLS
+- denial of service (crash, infinite loop, etc) that can be caused by any
+ user
Code
diff --git a/doc/biboumi.1.rst b/doc/biboumi.1.rst
index 03e8a36..5d6facc 100644
--- a/doc/biboumi.1.rst
+++ b/doc/biboumi.1.rst
@@ -42,10 +42,10 @@ variables, with the name all in upper case and prefixed with "BIBOUMI_".
For example, if the environment contains “BIBOUMI_PASSWORD=blah", this will
override the value of the “password” option in the configuration file.
-Sending SIGUSR1 or SIGUSR2 (see kill(1)) to the process will force it to
-re-read the configuration and make it close and re-open the log files. You
-can use this to change any configuration option at runtime, or do a log
-rotation.
+Sending SIGUSR1, SIGUSR2 or SIGHUP (see kill(1)) to the process will force
+it to re-read the configuration and make it close and re-open the log
+files. You can use this to change any configuration option at runtime, or
+do a log rotation.
Here is a description of every possible option:
diff --git a/packaging/biboumi.spec.cmake b/packaging/biboumi.spec.cmake
index d658c55..8d1848a 100644
--- a/packaging/biboumi.spec.cmake
+++ b/packaging/biboumi.spec.cmake
@@ -13,6 +13,7 @@ BuildRequires: libuuid-devel
BuildRequires: systemd-devel
BuildRequires: sqlite-devel
BuildRequires: postgresql-devel
+BuildRequires: botan2-devel
BuildRequires: cmake
BuildRequires: systemd
BuildRequires: pandoc
@@ -37,7 +38,7 @@ cmake . -DCMAKE_CXX_FLAGS="%{optflags}" \
-DCMAKE_BUILD_TYPE=release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DPOLLER=EPOLL \
- -DWITHOUT_BOTAN=1 \
+ -DWITH_BOTAN=1 \
-DWITH_SYSTEMD=1 \
-DWITH_LIBIDN=1 \
-DWITH_SQLITE3=1 \
@@ -63,6 +64,10 @@ make check %{?_smp_mflags}
%changelog
+* ${RPM_DATE} Le Coz Florent <louiz@louiz.org> - ${RPM_VERSION}-1
+- Build latest git revision
+- Build against botan2
+
* Wed May 25 2018 Le Coz Florent <louiz@louiz.org> - 8.2-1
Update to version 8.1
diff --git a/src/main.cpp b/src/main.cpp
index 59fda4e..09adc5c 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -103,6 +103,7 @@ int main(int ac, char** av)
sigaddset(&mask, SIGTERM);
sigaddset(&mask, SIGUSR1);
sigaddset(&mask, SIGUSR2);
+ sigaddset(&mask, SIGHUP);
sigprocmask(SIG_BLOCK, &mask, nullptr);
// Install the signals used to exit the process cleanly, or reload the
@@ -124,6 +125,7 @@ int main(int ac, char** av)
on_sigusr.sa_flags = 0;
sigaction(SIGUSR1, &on_sigusr, nullptr);
sigaction(SIGUSR2, &on_sigusr, nullptr);
+ sigaction(SIGHUP, &on_sigusr, nullptr);
auto p = std::make_shared<Poller>();
diff --git a/src/xmpp/biboumi_adhoc_commands.cpp b/src/xmpp/biboumi_adhoc_commands.cpp
index 3bd2e5a..1b5fdcb 100644
--- a/src/xmpp/biboumi_adhoc_commands.cpp
+++ b/src/xmpp/biboumi_adhoc_commands.cpp
@@ -116,6 +116,7 @@ void ConfigureGlobalStep1(XmppComponent&, AdhocSession& session, XmlNode& comman
auto options = Database::get_global_options(owner.bare());
+ command_node.delete_all_children();
XmlSubNode x(command_node, "jabber:x:data:x");
x["type"] = "form";
XmlSubNode title(x, "title");
@@ -223,6 +224,7 @@ void ConfigureIrcServerStep1(XmppComponent&, AdhocSession& session, XmlNode& com
server_domain);
auto commands = Database::get_after_connection_commands(options);
+ command_node.delete_all_children();
XmlSubNode x(command_node, "jabber:x:data:x");
x["type"] = "form";
XmlSubNode title(x, "title");
@@ -509,6 +511,7 @@ void insert_irc_channel_configuration_form(XmlNode& node, const Jid& requester,
auto options = Database::get_irc_channel_options_with_server_default(requester.local + "@" + requester.domain,
iid.get_server(), iid.get_local());
+ node.delete_all_children();
XmlSubNode x(node, "jabber:x:data:x");
x["type"] = "form";
XmlSubNode title(x, "title");
diff --git a/tests/end_to_end/__main__.py b/tests/end_to_end/__main__.py
index f8ef2d4..bef510c 100644
--- a/tests/end_to_end/__main__.py
+++ b/tests/end_to_end/__main__.py
@@ -2924,11 +2924,12 @@ if __name__ == '__main__':
Scenario("irc_channel_configure",
[
handshake_sequence(),
- partial(send_stanza, "<iq type='set' id='id1' from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}'><command xmlns='http://jabber.org/protocol/commands' node='configure' action='execute' /></iq>"),
+ partial(send_stanza, "<iq type='set' id='id1' from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}'><command xmlns='http://jabber.org/protocol/commands' node='configure' action='execute'><dummy/></command></iq>"),
partial(expect_stanza, ("/iq[@type='result']/commands:command[@node='configure'][@sessionid][@status='executing']",
"/iq/commands:command/dataform:x[@type='form']/dataform:field[@type='text-single'][@var='encoding_in']",
"/iq/commands:command/dataform:x[@type='form']/dataform:field[@type='text-single'][@var='encoding_out']",
"/iq/commands:command/dataform:x[@type='form']/dataform:field[@type='list-single'][@var='record_history']/dataform:value[text()='unset']",
+ "!/iq/commands:command/commands:dummy",
),
after = partial(save_value, "sessionid", partial(extract_attribute, "/iq[@type='result']/commands:command[@node='configure']", "sessionid"))
),