Commit Graph

103 Commits

Author SHA1 Message Date
Robert Adam
d100ff1467 MAINT: Update copyright to 2022 2022-01-04 20:17:33 +01:00
Robert
56db3410c5 MAINT: Update copyright notice to 2021 (Part II)
Apparently the first commit (59ae429972)
did not include all files.

Furthermore the used script tended to produce funny results in certain
cases. This has been fixed and as a result thereof a few more changes
were made in this second run.
2021-04-09 15:41:49 +02:00
Robert Adam
dda161138b REFAC: Make sure all macros are #undef'd again
If they are not there is the potential of name clashes when performing a
unity build.

See: https://stackoverflow.com/questions/847974/the-benefits-disadvantages-of-unity-builds
2021-03-06 18:57:22 +01:00
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
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
Robert Adam
c6a0984383 Qt: Adapted to use range-based constructors for lists/vectors/sets for
Qt 5.14 and higher

Qt 5.14 introduces a bunch of range-based constructors for the various
collection-classes that are now to be preferred over the generic
toList(), toSet(), toXY() functions
2020-02-27 15:29:48 +01: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
Mikkel Krautz
1e9d2b3c10 Murmur: fix bad interaction with QDBus and fork().
Qt 5.6 changed QDBus to use a thread, QDBusConnectionManager,
for managing DBus connections.

This caused a bad interaction with Murmur. It turns out that, prior
to this commit, the QDBusConnectionManager in Murmur was launched at
program start, because of a global static QDBusConnection in DBus.cpp.

This meant that there would be a QDBusConnectionManager thread around,
waiting to manage DBus connections. ...Until Murmur calls fork().

After fork()ing, the QDBusConnectionManager thread is gone -- fork only
keeps a 'main' thread, and isn't generally compatible with multi-threaded
programs.

Ouch!

Fortunately, the static global QDBusConnection (MurmurDBus::qdbc) was
only initialized this way because it worked in the past. Also, because
QDBusConnection has no default constructor, the 'qdbc' QDBusConnection
was statically initialized as a QDBusConnection to 'mainbus' on each
program launch. This wasn't strictly necessary -- it was only done because
QDBusConnection had no default constructor. However, there is no such thing
as an 'empty' QDBusConnection, so there not being a default constructor
does make sense.

To avoid the static global QDBusConnection, this commit changes MurmuDBus::qdbc
from a value to a pointer.

This allows us to defer the creation of the QDBusConnectionManager thread
until the first 'real' QDBusConnection is created -- after Murmur has forked.
This avoids the global static 'fake' QDBusConnection, and ensures the
QDBusConnectionManager thread is created after Murmur has forked.

Additionally, this commit also moves the registration of the 'MetaDBus'
object into the '!Meta::mp.qsDBus.isEmpty()' check in main.cpp.
This ensures the MetaDBus object is only registered if the user has
enabled DBus in murmur.ini. Without this change, the code would be
dereferencing a null MurmurDBus::qdbc.

Fixes mumble-voip/mumble#2820
2017-02-07 22:36:04 +01:00
Mikkel Krautz
91ebb8b0b5 Update tree copyrights to 2017. 2017-01-08 21:05:57 +01:00
Mikkel Krautz
f45c1f78f1 Murmur: fix MurmurDBus::addChannel that was broken by Murmur's new locking.
This method was broken by commit f260bd1913.

In particular, the line:

    Channel *nc = server->addChannel(cChannel, name);

was removed by a locked block:

    {
        QWriteLocker wl(&server->qrwlVoiceThread);
        server->addChannel(cChannel, name);
    }

Note that nc is never assigned in the locked block.

See
f260bd1913 (diff-a6537e937b1df62a77d014d7a8c3008bL377)
for the full diff.

Fixes mumble-voip/mumble#2392
2016-07-04 00:07:20 +02:00
Mikkel Krautz
f260bd1913 Implement correct write locking for addChannel/removeChannel/link/unlink. 2016-06-24 00:03:11 +02:00
Mikkel Krautz
fd9c7941b3 Murmur: add no-op userTextMessage signal for DBus to silence connect()'s error log output.
This gets rid of the following (harmless, but worrying) error in Murmur's log:

    <W>2016-06-04 00:17:39.229 QObject::connect: No such slot MurmurDBus::userTextMessage(const User *, const TextMessage &)
2016-06-04 00:51:46 +02:00
Mikkel Krautz
54c28d3ee1 src/murmur: update to use LICENSE.header. 2016-05-10 22:42:02 +02:00
James Fraser
0288120124 Don't expose SSL secrets over Ice/D-Bus.
I think there's a good excuse for this: we don't expose a user's password
hash over Ice, which is actually a pain in the backside for migrating
servers via Ice. So in the interests of consistency, I think it's probably
better to not expose the SSL private key or it's passphrase over Ice either,
particularly since SSL keys are a bit of a "cat out the bag" thing.

Note that at present, the SSL passphrase isn't exposed via meta either - the
"key" field of meta.GetDefaultConf() contains a plaintext copy of the key,
but I left the check in anyway in case we change that for any reason.

When the user specifically requests things that ought to be secret over Ice,
we raise an exception rather than have it silently fail, to hopefully reduce
the amount of head-scratching some poor script writer has to do.

Finally, more or less do the same thing over D-Bus.
2016-05-01 16:32:04 +02:00
Benjamin Jemlich
07737a314c Fix include guards and PCH includes 2011-11-09 00:12:10 +01:00
Benjamin Jemlich
089b23d977 Fix ghost disconnect removing permissions (#3423985)
Returning a list of groups using an authenticator added
temporary group membership for the user id only. Those are
removed when we're disconnecting an old user using the same
user id. Adding the session id to the group should fix the
problem.

This won't work if someone uses verifyPassword to set the
permissions (which is an undocumented implementation detail
anyway).
2011-10-23 09:30:02 +02: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
Thorvald Natvig
f3437a6ba7 Update copyright year ranges of dev team. 2011-03-18 05:52:51 +01:00
Mikkel Krautz
6c63e2a515 Pass user's current priority speaker flag in DBus. Not false. 2010-03-31 16:57:03 +02:00
Mikkel Krautz
6691d62435 Pass false for priority speaker on DBus. 2010-03-31 15:51:06 +02:00
Thorvald Natvig
7d8100275d Split ServerUser from Server.cpp 2010-01-28 12:34:38 +01:00
Thorvald Natvig
16339bfc91 Update license to 2010 2010-01-05 08:49:22 +01:00
Thorvald Natvig
3de31ced4e Indent, changelog and submodule update 2009-10-02 15:10:57 +02:00
Thorvald Natvig
8d0b279ad1 Fix dbus compile on Win32 2009-10-01 21:13:45 +02:00
Thorvald Natvig
da6e842050 Use service.name instead of :x.y in DBus calls 2009-09-30 18:28:28 +02:00
Thorvald Natvig
03516cc9ba Send full cert details to external authenticator 2009-09-18 19:12:21 +02:00
Thorvald Natvig
d41afda372 Move mumble/murmur specific state out of User 2009-08-21 02:22:43 +02:00
Thorvald Natvig
ce3df76c85 Use enum for InfoMap 2009-08-15 21:17:17 +02:00
Thorvald Natvig
d559445010 Send uid=-1 to all clients when unregistering connected user 2009-08-02 16:05:55 +02:00
Stefan Hacker
65a0f65240 Make the fix actually work. 2009-07-25 21:35:27 +02:00
Stefan Hacker
144c631657 Fix argument injection. 2009-07-25 21:01:30 +02:00
Thorvald Natvig
fe479036ba Show suppress state in client 2009-07-21 15:19:57 +02:00
Thorvald Natvig
efbba85c60 Temprary channels protocol changes 2009-07-15 16:43:43 +02:00
Thorvald Natvig
a98d45a393 Faster quint64 based netaddress handling 2009-05-15 17:24:27 +02:00
Thorvald Natvig
86569fbdb0 Indent, changelog and submodule update 2009-05-10 12:19:01 +02:00
Thorvald Natvig
e3cc00c5c1 Store date, duration, username, reason and hash with bans 2009-05-05 16:16:38 +02:00
Thorvald Natvig
51120fe838 s/Player/User/ 2009-05-02 17:52:14 +02:00
Thorvald Natvig
d6b878a82f Expand ACL permissions serverside 2009-04-29 15:15:07 +02:00
Thorvald Natvig
a6886afe8f Indent, changelog and submodule update 2009-04-22 14:59:59 +02:00
Thorvald Natvig
6a4fa301f3 info-based storage for registration 2009-04-22 14:58:12 +02:00
Thorvald Natvig
e364a458bc Indent, changelog and submodule update 2009-03-28 17:39:11 +01:00
Thorvald Natvig
5ec7a580c7 ProtoBuf for Ice/DBus 2009-03-28 15:42:19 +01:00
nomad
7bd80f87d0 Adding channel descriptions 2009-03-01 23:31:22 +01: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
5001daa721 External Ice Authentication
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@1547 05730e5d-ab1b-0410-a4ac-84af385074fa
2009-02-18 01:02:53 +00:00