In case when mtr-gtk is started from gnome-shell we need to make sure
that parent process of pkexec is not systemd. This is because pkexec
exits with error if it detects that its parent is PID 1 [1].
Execing pkexec was fine before F22, because previously gnome-shell was
reaping processes it spawned. Since F22 gnome-shell doesn't do that and
it calls g_spawn_async w/o G_SPAWN_DO_NOT_REAP_CHILD flag in which case
glib really doesn't bother with reaping child processes properly and
instead it does double fork(). Intermediate child process goes away and
grand-child is then reparented to PID 1 that will reap it. [2]
[1] https://cgit.freedesktop.org/polkit/commit/src/programs/pkexec.c?id=3b12cfac29dddd27f1f166a7574d8374cc1dccf2
[2] https://git.gnome.org/browse/gnome-shell/commit/?id=01c6392c1373cf23786a0dad1b670a511107349c
Previously if there were three nameservers configured and third one was
reachable via IPv6 we didn't sent query to it, since NSCOUNT6 was equal to
one. Clearly it was the original intention to sent query to all IPv6
nameservers.
Reported-by: Benedikt Gollatz <benedikt@gollatz.net>
Resolves: #966174
In report mode we break out from select loop immediately after we reach
maximum count of iterations. But we should wait for packets which are still on
the way.
In order to fix the issue we introduce grace period during which we don't send
out more packets but we just wait for responses which might be still on the way.
Resolves: #1009051
Previously we used consolehelper in order to authenticate user who wants to run
mtr-gtk. In Fedora we have newer framework providing access control for
privileged operations, policykit.
This commit replaces consolehelper configuration and provides policy file for
policykit and shell wrapper which runs mtr via pkexec. Note that this is not ideal and
we haven't gained a lot by this.
In the long run we should really decouple gtk frontend and mtr backend. Backend
then would have CAP_NET_RAW capability encoded in filesystem and as soon as
possible it would drop that capability and start providing data to be rendered
by gtk frontend which would run completely unprivileged.
http://fedoraproject.org/wiki/Features/UsermodeMigrationResolves: #502750
We have to make sure that it is obvious how one can create tarball
included in srpm if it doesn't originate upstream.
generate-tarball.sh will create xz compressed tarball which doesn't
include any object files. This script will be dropped as soon as
creation of upstream tarball works properly again.