Age | Commit message (Collapse) | Author |
|
In ccbf4072c the rememberchannelduration logic was improved. An explicit
call to 'setTimeSpec(Qt::UTC)' was removed, because it was assumed that
'secsTo' would already be sufficient as it converts both inputs to UTC
automatically. Due to an oversight this lead to a regression.
The reason setTimeSpec is acutally needed is because the DB already
contains UTC values. The setTimeSpec call tells Qt that the loaded
values are actually already UTC and do not have to be converted.
Without the call to setTimeSpec, the DB values are effectively
converted twice, which gives rememberchannelduration an offset
based on the server local time.
|
|
As it was, the sent UserState message would have only contained the
user's session ID, which in and of itself is absolutely useless.
Thus, it is better to not send a UserState message in this case.
|
|
For registered users, the server will now remember their channel
listeners (and their volume adjustments) and will restore them once the
user rejoins this server.
|
|
|
|
Previously the server was only looking for files named e.g. murmur.ini
or murmur.sqlite. With this commit, the server will now look first for
files called mumble_server.ini and mumble_server.sqlite before falling
back to the old names (for backwards compatibility).
This is meant as a means to drive forward the server renaming from
murmur(d) to mumble-server.
|
|
|
|
|
|
|
|
|
|
These headers are not used anymore (since the switch from qmake to
cmake).
|
|
Renames the internal version member variables from "uiVersion"
to "m_version"
|
|
Previously, the Mumble version was encoded with a uint32
in the network protocol reserving 2 bytes for the major
component and 1 byte for each minor and patch.
The versioning format was changed to include a build
number in the patch field. With a recent update (1.4.274)
the patch field exceeded 255 for the first time and broke
the protocol version.
This commit completely reworks how the version is stored
internally and transfered with the network protocol.
The new version is a uint64 and consists of 4 fields with
2 bytes each. This allows each version component to reach
up to 65535. Furthermore, all instances of integer version
types have been replaced with the alias Version::full_t for
a better abstraction. Version literals have been replaced by
Version::fromComponents calls.
Fixes #5827
|
|
The suppress state of a user represents whether the user is currently in
a channel in which they don't have the Speak ACL. As of now this state
is only updated whenever the user switches channel.
However, the suppress state should also change, if the ACL for a given
channel change. This is what the current commit does. If this is not
done, a user will be able to continue speaking in a channel where they
should not be able to and only if they leave and re-join the channel
will the new ACL take effect.
To avoid such a situation, the current code updates the suppress state
every time the ACL change.
Fixes #5264
|
|
The suppress state of a user represents whether the user is currently in
a channel in which they don't have the Speak ACL. As of now this state
is only updated whenever the user switches channel.
However, the suppress state should also change, if the ACL for a given
channel change. This is what the current commit does. If this is not
done, a user will be able to continue speaking in a channel where they
should not be able to and only if they leave and re-join the channel
will the new ACL take effect.
To avoid such a situation, the current code updates the suppress state
every time the ACL change.
Fixes #5264
|
|
7439bc4fe6b423ff0d36d3b1d529e474c14e9b01 introduced the ability for
clients to query for their permissions in any given channel. Since that
commit also added an automatic permissions broadcast for channels that a
client enters (and also its parent channel), it also introduced a
system to keep track of whether a given permission set has already been
broadcast to a given client. Supposedly this was meant as to not flood
the client with PermissionQuery messages if it just keeps switching
between the same channels (and thus already knows about the respective
permissions after having joined a channel for the first time).
Oddly enough though, when a client explicitly requests to be informed
about a channel's permissions, the cache would also be consolidated and
if the server was under the impression that the client already knows
about these permissions, its explicit query would simply be ignored.
This is of course nonsense, since ultimately it is the client who knows
whether it wants to be informed about those permissions (again) or not.
Therefore, this commit ensures that explicit queries are always
answered. No need to consolidate the cache and decide on whether the
server feels like answering or not.
Fixes #5699
|
|
In theory these changes should cause the server to no longer silently
ignore encountered INI syntax errors.
In practice however, it seems that it is pretty much impossible to
create an INI file that Qt actually considers erroneous and thus this
code essentially doesn't work. But in case Qt ever fixes this weird
behavior, at least in theory Mumble users should immediately profit from
it.
Fixes #5749
|
|
The previous implementation of rememberchannelduration (#4147)
acknowledged the unreliability of the last_disconnect database
field. It used a workaround to set the last_disconnect field
to NULL for every user on every start of the mumble server.
However, with a default behavior for NULL, this created the
unintended side-effect that rememberchannel was erroneously
used for every user on their first connection after a server
restart.
This new implementation reverts the workaround of #4147 and
uses the last_active database field to check if last_disconnect
is reliable. If last_disconnect is unreliable, it will now use
the server uptime and compare it to rememberchanneduration.
We expect last_disconnect to be unreliable when the server
was shut down while clients are still connected.
Fixes #5639
|
|
1d45d991aa4d53b6c1bd7d7cae0126a21f3991e1 refactored the audio processing
on the server and introduced the new AudioReceiverBuffer class. In the
function that is responsible for obtaining the current range of
receivers that shall obtain the identical audio packet, the passed begin
iterator was always dereferenced. However, in the case in which the
receiver list is actually empty begin == end and therefore dereferencing
the begin iterator is undefined behavior.
This could lead to the entire server crashing (or could work just fine -
UB is great at this) but in any case, this is a severe problem.
The fix consists of a simple check for this specific situation and an
early return in that case.
Co-Authored-By: Irak Rigia <tarakrigia@gmail.com>
|
|
|
|
This should allow to get detailed insights into the audio processing
performance when using the Tracy profiler.
|
|
This message type is explicitly handled before calling into the
different msg* implementations. Therefore, msgUDPTunnel could never be
called in the current state of the code base.
However, we can't remove the implementation completely, because of the
macro voodoo that is used to declare and switch over the different
message types (we can't remove the entry from the macro, since in there
we still need it for defining the respective enum entry).
|
|
Previously the opusthreshold config option had a default value of 100
meaning that the first non-Opus client would cause everyone to fall back
to one of the legacy codecs.
Since Opus has been implemented for ages now and we eventually want to
get rid of the legacy codecs, this commit changes the default value of
this config option to be zero, meaning that the server will always
enforce the use of the Opus codec (regardless of what clients are
connected).
|
|
Previously Mumble was using a custom binary format for transmitting data
via UDP (mainly audio). This has worked for a long time but besides
being inconvenient for 3rdParty implementors (they had to manually
re-implement encoding and decoding support for this format) this format
was not very flexible and changes to the data format were very hard.
In order to improve on this situation, this commit introduces changes
that allow to use Protobuf for the UDP messages as well (it's already
used for TCP). With that it should be relatively easy to extend/change
the UDP packet formats in the future and 3rdParty implementors can now
simply use Protobuf to handle decoding/encoding packets for them (much
less work and much less prone to errors).
Since the new Protobuf format is incompatible with the old UDP format,
this commit also includes support for dealing with older clients or
servers that don't recognize the new protocol yet. That way the new
protocol format is only used if both the client and the server are
recent enough to have it implemented (assumed to be the case >=1.5.0).
Note also that the server will make sure that clients using the old and
the new format can seamlessly communicate with one another.
Therefore, on the surface it should not be noticeable to the user which
protocol is currently used.
Note also that the new protocol format only supports Opus as an audio
codec. If one of the legacy codecs is to be used, the legacy packet
format has to be used as well. However, all codecs except for Opus will
be removed from Mumble in the future anyway.
Fixes #4350
|
|
The server already supported this flag, but printed the version
information in a weird format and for the client this flag is completely
new.
Fixes #5598
|
|
The gRPC implementation never left the experimental state and never
reached a properly stable state to the point where we would feel good
about enabling it by default. In addition to that, there has been no
further attempts at finding and fixing the encountered issues in the
implementation (except #3947 but that was discontinued).
As such we had an essentially unmaintained piece of code in our server
implementation that was known to be buggy and that nobody wanted to fix.
In addition to that the implementation itself could not be considered
very clean or elegant and therefore only represented a few smelly
corners in our code base.
For this reason, we decided to remove the gRPC support entirely from
Mumble (for now).
What we hope to gain by that is:
- Prevent people from building unstable server versions and then coming
to us complaining that it crashed/misbehaved
- Removing (essentially) dead code
- Reduce the RPC implementation complexity
That last piece is crucial: By removing gRPC support we reduce the
amount of supported RPC frameworks to only one (ignoring DBus for now).
Our future plans include a refactoring of how RPC is being handled and
implemented and only having to worry about maintaining compatibility
with one RPC system is much easier than having to worry about two (with
(slightly) different APIs).
Once the RPC implementation has been rewritten, more RPC backends may be
reintroduced and in that process we might investigate adding a proper
gRPC implementation to the code (that then hopefully is more stable than
the current one).
Fixes #4567
Fixes #4197
Fixes #3496
Fixes #3429
Fixes #3265
|
|
The name `murmur` is deprecated and shouldn't be used anymore, as
decided by the Mumble project. While the server binary already uses the
"new" name, the man pages don't. Thus, rework the man pages so that its
successor `mumble-server` instead `murmur` is used and rename the
filenames of the man pages accordingly.
Also, rename the script `murmur-user-wrapper` to
`mumble-server-user-wrapper`, since also its man page is renamed.
This does not affect the configuration file `murmur.ini`.
Signed-off-by: Felix Singer <felixsinger@posteo.net>
|
|
Signed-off-by: Felix Singer <felixsinger@posteo.net>
|
|
|
|
Tracy (wolfpld/tracy) is a profiler that is aimed at
having a very low impact on the runtime performance and is thus suitable
to be used in production systems to figure out what is going on and how
the code is performing.
For the time being, this commit instruments only the server code.
Furthermore, the instrumentation is performed in a rather minimalistic
way that should suffice to start profiling audio and control message
processing but is definitely far from being complete. Further
instrumentation will be added on-demand.
|
|
Tracy (https://github.com/wolfpld/tracy) is a profiler that is aimed at
having a very low impact on the runtime performance and is thus suitable
to be used in production systems to figure out what is going on and how
the code is performing.
For the time being, this commit instruments only the server code.
Furthermore, the instrumentation is performed in a rather minimalistic
way that should suffice to start profiling audio and control message
processing but is definitely far from being complete. Further
instrumentation will be added on-demand.
|
|
|
|
Just as we are doing for the copyright-year and project version
information, we now also let cmake insert the project's description into
the plist files. This removes redundancy and should facilitate future
maintenance.
|
|
In theory LTO could give us a bit more performance than what we are
currently seeing. Client-side this will probably not be very noticeably
but on the server-side a few drops of extra performance can't hurt.
LTO will be enabled by default in all non-Debug builds. It remains
disabled for Debug builds as this is expected to be the kind of build
that a developer will use when they perform their work and there it is
useful to be able to go through multiple iterations of the program,
without waiting long times on the linker each time.
|
|
The previously used sourceforge-related IDs were really outdated and
were therefore changed.
And while we were touching these already, the description was also
adapted to remove the "intended for gamers" touch from it.
|
|
The "ODR" (One Definition Rule) states that any function/object/etc. may
only be defined once. However, since we are using some preprocessor
magic to only include certain fields in the Channel struct, we have to
make sure that everywhere Channel.h is included, these macros are set
accordingly.
However, the User.h was part of the "shared" library and in that case no
macros were being set when compiling this translation unit. In the
actual client however, the "MUMBLE" macro is set, such that all headers
being part of the "mumble" target will use a different Channel
definition than the User class which is part of the "shared" target.
In order to not violate the ODR, the User class was not excluded from
being part of the "shared" target and is instead explicitly included in
the "mumble" and "mumble-server" targets (making sure the necessary
macros will be set).
|
|
This commit attempts to narrow down the lock scopes in the Ice
implementations. It also removed a few locks that were taken before
making a DB connection.
This could potentially take a significant amount of time (when taking
into account that during that time the voice thread is pretty stalled)
and also any DB connection mustn't be performed from outside the main
thread anyway. Therefore, these function calls should be "implicitly
synchronized" (only occur from a single thread).
|
|
Inside Server::msgUserState there are a couple of places that implement
the functionality of a client making modifications to itself (e.g.
self-mute). In these cases, uSource == pDstServerUser. Therefore
functionality-wise, it doesn't matter which of these variables the
implementation uses. However, there is a semantic differences and as
such this commit refactors these code parts to perform the actions on
pDstServerUser instead of uSource in order to make clear that
pDstServerUser is always the user to whom the action is applied.
|
|
This commit attempts to narrow down the lock scopes in the Ice
implementations. It also removed a few locks that were taken before
making a DB connection.
This could potentially take a significant amount of time (when taking
into account that during that time the voice thread is pretty stalled)
and also any DB connection mustn't be performed from outside the main
thread anyway. Therefore, these function calls should be "implicitly
synchronized" (only occur from a single thread).
|
|
Using a four-segment version (major.minor.patch.build) is causing issues
on Windows, because it tends to ignore the fourth version number in most
cases. This can cause upgrades to fail and/or multiple entries being
created in the installed applications list.
For this reason, this commit changes the version format to be
major.minor.build.
Fixes #4921
|
|
When joining a server, a client is placed in the root channel by
default. However, this placement was implicit as the server would
explicitly exclude this information to be broadcast with the sent
UserState message.
In order to facilitate external applications to get this all right, this
commit now makes sure that this information is shared explicitly (just
as if the user would be placed in a different channel because the server
remembered their last channel).
Note: This commit also adapts the client code to only move the user if
the specified channel is not its current channel already, but even
without this change, the client code will handle the additional
information gracefully.
Fixes #5270
|
|
from a chain
Currently, obtaining and validating the peer's certificate chain is a mess. While obtaining the chain (which is ordered, starting with the peer's immediate certificate and ending with the CA's certificate), the peers immediate certificate is added again, as last certificate. Then, while validating, the last certificate is checked. This approach works (since the validated certificate is the one that is expliticly added), but puts the whole concept of a ordered certificate chain to absurdity.
This commit fixes that. First, the chain it is returned unaltered in its original form (ordered and starting with the peer's immediate certificate and ending with the CA's certificate). Then, while validating, the first certificate in this chain is checked.
|
|
Some of the ICE functions were writing data without holding the
respective lock.
|
|
Currently, obtaining and validating the peer's certificate chain is a mess. While obtaining the chain (which is ordered, starting with the peer's immediate certificate and ending with the CA's certificate), the peers immediate certificate is added again, as last certificate. Then, while validating, the last certificate is checked. This approach works (since the validated certificate is the one that is expliticly added), but puts the whole concept of a ordered certificate chain to absurdity.
This commit fixes that. First, the chain it is returned unaltered in its original form (ordered and starting with the peer's immediate certificate and ending with the CA's certificate). Then, while validating, the first certificate in this chain is checked.
Fixes #3523 (partially)
|
|
Some of the ICE functions were writing data without holding the
respective lock.
|
|
This commit adds a new server-configuration that can be used in the
murmur.ini file. It can be used to forbid anyone on the server from
using Mumble's built-in recording functionality.
Any client trying to start a recording nonetheless, will be kicked from
the server.
From Mumble 1.5.0 clients will know about this configuration and will
disable the recording action in the UI, if recording is not allowed on
the server.
|
|
The check for configured network interfaces at startup has a problem
that if IPv4 is not configured for some reason, Mumble will bind to
IPv6-only socket, and will not be available over IPv4 until manually
restarted.
There's no harm binding to the "any" IPv6 address with IPV6_V6ONLY set
to 0 even if there're no assigned addresses of either address family.
The bind will succeed either way, and will accept connections on any
new address configured in the system regardless of the address family.
QHostAddress::Any tries to setup an AF_INET6 socket with IPV6_V6ONLY
set to 0, and falls back to AF_INET in case it's unavailable.
However, it will only happen if IPv6 is completely disabled on the
system, which is a rare configuration, but nevertheless it will fall
back gracefully.
Fixes #5208
|
|
The code that was used to create the tray icon was perfectly fine. The
issue was that the icon that was set was invalid because Qt did not find
the respective resource (which for some reason leads to the tray entry
not being shown at all).
The issue was that auto-RCC was not enabled for the server. This is
probably because usually the server doesn't need it, except on Windows
where we have that tray icon. While the respective resource files were
present and added as needed, the lack of this property caused Qt to
never process the resource file and thus thew icon was always missing.
Fixes #4930
|
|
13b85a3 introduced a new feature for
which it is required to remember when the last user disconnected from a
channel. However in the upgrade path that variable was part of the query
but not of the insert statement.
Note this reverts the changes of #5131 as it seems the approach taken there was wrong.
|
|
The implementation for the Ice setACL function did not take a write lock
even though it writes to objects that are owned by the main thread
(thereby violating the synchronization scheme in the server code).
Due to it deleting Group objects this is strongly suspected to have
caused a Segfault crash of the server when the voice thread would check
whether a user has permission in a channel while the ACL for that is not
cached. The Segfault then occurs in Group::isMember when dereferencing
the Group pointer (which got deleted in the Ice function).
|
|
13b85a3ae2580636c2a3171e1ab09a608f19e838 introduced a new feature for
which it is required to remember when the last user disconnected from a
channel. However in the upgrade path that variable was part of the query
but not of the insert statement.
|