Commit Graph

47 Commits

Author SHA1 Message Date
Robert Adam
59ae429972 MAINT: Update copyright notice to 2021
This was done by running scripts/updateLicenseHeaders.py and then
manually editing the LICENSE file.
2021-03-02 10:15:01 +01:00
Robert
af7dac72f4 FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
Robert Adam
ced1fdd37c FIX(cmake): Set QT_RESTRICTED_CAST_FROM_ASCII
With the old qmake buildsystem we used to set QT_NO_CAST_FROM_ASCII (for
the Mumble client) in order to avoid problems with character encodings
in our Strings. This was not done in the new cmake system yet.

Instead of the aforementioned macro, this commit sets (for all targets)
QT_RESTRICTED_CAST_FROM_ASCII instead in order to be able to
automatically convert direct String literals to QString as these usually
don't contain any problematic characters (non-ASCII) in the first place.
And this allows to e.g. compare a QString against a String literal or do
something like
QString myString = "This is a test";
which we know to be unproblematic.

Note however that (quote from Qt's docs)
"Using this macro together with source strings outside the 7-bit range,
non-literals, or literals with embedded NUL characters is undefined."
2020-08-31 09:59:05 +02:00
Popkornium18
410837526c REFAC(server): replace NULL with nullptr
This changes all occurances of NULL in the murmur source
dir to nullptr. Additionally explicit comparisons with NULL were
removed.
2020-07-02 00:55:36 +02:00
Davide Beatrici
4e67a2fafb Auto-update LICENSE.header in source files 2020-01-07 03:09:22 +01:00
Davide Beatrici
15831dbca8 Add missing includes for "no-pch" build
This commit adds all the missing includes when the PCH header is not used.

Also, some includes are reordered and/or made consistent (e.g. "#include <QtEndian>" -> "#include <QtCore/QtEndian>").
2019-09-12 22:08:39 +02:00
Davide Beatrici
5a07244a44 Don't include PCH headers directly
According to Qt's documentation the PCH header doesn't need to be included.

From https://doc.qt.io/qt-5/qmake-precompiledheaders.html:

"To make your project use precompiled headers, you only need to define the PRECOMPILED_HEADER variable in your project file."

"qmake will handle the rest, to ensure the creation and use of the precompiled header file. You do not need to include the precompiled header file in HEADERS, as qmake will do this if the configuration supports precompiled headers."
2019-09-12 00:13:35 +02:00
Davide Beatrici
b427333257 Auto-update LICENSE.header in source files 2019-01-25 04:56:19 +01:00
Mikkel Krautz
f6ba3a52bf Auto-update LICENSE.header in source files. 2018-01-01 23:05:37 +01:00
Jan Klass
d8f7800b16 Make use of EnvUtils::setenv 2017-05-20 19:59:13 +02:00
Mikkel Krautz
fd78d6431e Meta, UnixMurmur: implement live certificate reloading via the USR1 signal.
This moves the SSL loading code from MetaParams::read() into a separate
method, loadSSLSettings(). It also hooks up the SIGUSR1 signal handler
to reload SSL settings and apply the setings to each suitable virtual
server.

A follow-up commit will change MetaParams::read() to also use loadSSLSettings(),
however it was left out of this commit to aid in reviewability.
2017-03-02 01:56:35 +01:00
Mikkel Krautz
f2ea3dec5f UnixMurmur: Add USR1 signal handler for reloading SSL settings.
Hot certificate reloading will use the USR1 signal.

This adds the meat of the implementation to UnixMurmur, such that
the PR for live-reloading SSL settings via the SIGUSR1 signal is
more easily digestable.
2017-02-26 19:25:36 +01:00
Mikkel Krautz
91ebb8b0b5 Update tree copyrights to 2017. 2017-01-08 21:05:57 +01:00
Mikkel Krautz
54c28d3ee1 src/murmur: update to use LICENSE.header. 2016-05-10 22:42:02 +02:00
Mikkel Krautz
08d7cb3aa7 UnixMurmur: ensure logToSyslog is initialized to false. 2014-07-27 21:47:33 +02:00
main()
30023c5b36 Support logging to syslog in Murmur
Simply set the logfile path to "syslog" and Murmur will log to syslog.

This should be stable, it has approximately 4 user-months of testing.
2014-07-18 12:09:06 +02:00
Benjamin Jemlich
7300338ca0 Try to read system-wide ini files first if running as root 2012-01-14 22:48:45 +01:00
Benjamin Jemlich
07737a314c Fix include guards and PCH includes 2011-11-09 00:12:10 +01:00
Kissaki
5fe6801b1b handle some cppcheck-found issues:
* uninitialized membervars,
* AudioOutput.cpp: fix delete on array to delete[]
* OSS.cpp: close file descriptor in false data case
* OverlayEditorScene.cpp: rm duplicate logic
* fix ifndef to match usage of declared variable
* member var initializations
* check for null (ds in d3d9 as some lines above),
* lower scope of var decl.,
* swap bufsize check and array dereference so check is before! deref,
* initialize member vars in constr.
2011-10-09 14:01:58 +02:00
Ludwig Nussel
3322f1b386 remove CAP_NET_ADMIN
QoS settings do not need CAP_NET_ADMIN anymore
2011-05-15 17:18:18 +02:00
Thorvald Natvig
f3437a6ba7 Update copyright year ranges of dev team. 2011-03-18 05:52:51 +01:00
Thorvald Natvig
0e66a64115 Make log rotation more robust 2011-03-17 05:43:22 +01:00
Ludwig Nussel
7d2d3ef3f8 open log file early so log dir can be root owned
http://article.gmane.org/gmane.comp.security.oss.general/4404
2011-03-17 05:15:24 +01:00
Ludwig Nussel
82c4186dca fix user switching
- don't keep saved uid 0. That's bad as an attacker that manages to
  execute code could switch back to uid 0
- set $HOME as Qt doesn't look at passwd information
- initialize supplementary groups
- use "mumble-server" as fallback if no user is specified
2011-03-17 05:15:23 +01:00
Thorvald Natvig
814752a807 Request CAP_SYS_RESOURCE and dynamically increase nofile on demand 2010-01-16 00:56:20 +01:00
Thorvald Natvig
16339bfc91 Update license to 2010 2010-01-05 08:49:22 +01:00
Thorvald Natvig
2a2417a5c3 If sighup when not detached, interpret as quit 2009-10-20 18:31:45 +02:00
Thorvald Natvig
936ef86d86 Remove a lot of compiler warnings 2009-04-30 12:52:52 +02:00
Thorvald Natvig
2e778f6aef Indent 2009-03-06 15:39:18 +01:00
Mikkel Krautz
6d6c67dbf3 Fix Murmur build in OSX/Darwin. 2009-03-04 20:36:01 +01:00
Thorvald Natvig
f2232a51eb Use realtime threads on Linux, as posix threads aren't prioritized under SCHED_OTHER 2009-03-03 20:18:52 +01:00
Thorvald Natvig
6ef0a0cae1 Indent 2009-03-01 22:01:30 +01:00
Thorvald Natvig
5db28fa43d Even with dropped capabilities, running murmurd as root is not a good idea, so always warn the user
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@1601 05730e5d-ab1b-0410-a4ac-84af385074fa
2009-02-28 01:36:47 +00:00
Thorvald Natvig
796afe0536 Avoid messing with ulimits in murmurd, and first part of updated init script to use privileged capabilities
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@1600 05730e5d-ab1b-0410-a4ac-84af385074fa
2009-02-28 01:33:51 +00:00
Thorvald Natvig
5d9edfb893 Don't keep CAP_DAC_OVERRIDE after switching users
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@1593 05730e5d-ab1b-0410-a4ac-84af385074fa
2009-02-27 12:47:30 +00:00
Thorvald Natvig
a5a3a73bf1 Unbreak QoS on Unix
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@1592 05730e5d-ab1b-0410-a4ac-84af385074fa
2009-02-27 02:36:05 +00:00
Thorvald Natvig
b34cbc71bf Clean up logic for capabilities, add resources automatically if root, and update the limits test
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@1589 05730e5d-ab1b-0410-a4ac-84af385074fa
2009-02-26 20:31:48 +00:00
Thorvald Natvig
2c9f4f07dc Add a umask, add the CAP_SETGID capability, and print a warning if running murmurd as root without a username to drop to.
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@1588 05730e5d-ab1b-0410-a4ac-84af385074fa
2009-02-26 17:54:46 +00:00
Thorvald Natvig
7fc01d602e Use Linux capabilities to allow us to really use high priority threads
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@1587 05730e5d-ab1b-0410-a4ac-84af385074fa
2009-02-26 14:03:27 +00:00
Thorvald Natvig
7041b3fd02 murmur_pch.h cleanup [lewellyn]
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@1574 05730e5d-ab1b-0410-a4ac-84af385074fa
2009-02-23 13:54:11 +00:00
Thorvald Natvig
ff728cda4e Indenting run
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@1545 05730e5d-ab1b-0410-a4ac-84af385074fa
2009-02-17 15:43:12 +00:00
Thorvald Natvig
7148a0b5c9 Add a thread count test
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@1541 05730e5d-ab1b-0410-a4ac-84af385074fa
2009-02-16 14:25:12 +00:00
Thorvald Natvig
8f5da0fc0a Use qCritical where it makes sense.
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@1400 05730e5d-ab1b-0410-a4ac-84af385074fa
2009-01-09 01:46:25 +00:00
Thorvald Natvig
ad2b8e2149 Update copyright for 2009
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@1380 05730e5d-ab1b-0410-a4ac-84af385074fa
2009-01-05 15:12:48 +00:00
Thorvald Natvig
e93c194397 Indenting run
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@1019 05730e5d-ab1b-0410-a4ac-84af385074fa
2008-03-20 14:26:20 +00:00
Thorvald Natvig
dc7e438976 Update copyright for 2008
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@908 05730e5d-ab1b-0410-a4ac-84af385074fa
2008-01-05 16:25:48 +00:00
Thorvald Natvig
ea46e429de Handle SIGTERM and SIGHUP in Murmur
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@906 05730e5d-ab1b-0410-a4ac-84af385074fa
2007-12-16 13:16:18 +00:00