Commit graph

22 commits

Author SHA1 Message Date
Thomas Haller
09090f2669 wifi-p2p: rename Wi-Fi P2P
After renaming the files, also rename all the content
to follow the "Wi-Fi P2P" naming scheme.
2019-02-01 17:02:57 +01:00
Benjamin Berg
00e64d1332 core/devices: Add P2P Wifi device and peer tracking
This only adds the new device type and simple peer list handling.
2019-01-27 23:45:12 +01:00
Beniamino Galvani
aca671fff0 all: replace "it's" with "its" where needed 2018-04-18 14:14:07 +02:00
Thomas Haller
ff5b7275a7 dbus: allow firewalld to communicate with NetworkManager
Usually, this "<allow send_destination="..."/>" part is shipped
by firewalld's D-Bus policy. However, if firewalld is initially
not installed with NetworkManager already running, dbus-daemon
seems to cache the missing permission for the D-Bus connection.
As a result, when installing and starting firewalld, NetworkManager
requests fail until restart:

  firewall: [0x7f4b83643890,change:"eth1"]: complete: request failed (Rejected send message, 1 matched rules; type="method_call", sender=":1.3" (uid=0 pid=715 comm="/usr/sbin/NetworkManager --no-daemon ") interface="org.fedoraproject.FirewallD1.zone" member="changeZone" error name="(unset)" requested_reply="0" destination=":1.25" (uid=0 pid=1243 comm="/usr/bin/python -Es /usr/sbin/firewalld --nofork -"))

https://bugzilla.redhat.com/show_bug.cgi?id=1436770
(cherry picked from commit cc1d409ba8)
2017-04-21 13:41:21 +02:00
Thomas Haller
ebb3830e57 org.freedesktop.NetworkManager.conf: don't use tabs
(cherry picked from commit 8583e62276)
2017-04-21 13:41:21 +02:00
Mathieu Trudel-Lapierre
18282df0aa dns: use DBus to make dnsmasq nameserver changes
Use DBus to make nameserver updates rather than restarting the dnsmasq binary
again and again.

Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>

https://mail.gnome.org/archives/networkmanager-list/2016-March/msg00144.html
2016-04-21 15:32:07 +02:00
Lubomir Rintel
f29d90115f dbus: fix a typo in the comment 2016-03-21 14:05:54 +01:00
Lubomir Rintel
53029e321d dbus: don't do <deny send_interface="..." /> in dbus service file
It does more than intended; apart from denying messages to that particular
interface it also denies all messages non-qualified with an
interface globally.
This blocks messages completely unrelated to wpa_supplicant, such as
NetworkManager communication with the VPN plugins.

From the dbus-daemon manual:

  Be careful with send_interface/receive_interface, because the
  interface field in messages is optional. In particular, do NOT
  specify <deny send_interface="org.foo.Bar"/>! This will cause
  no-interface messages to be blocked for all services, which is
  almost certainly not what you intended. Always use rules of the form:
  <deny send_interface="org.foo.Bar" send_destination="org.foo.Service"/>

We can just safely remove those rules, since we're sufficiently protected
by the send_destination matches and method calls are disallowed by default
anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=763880
2016-03-20 12:22:32 +01:00
Lubomir Rintel
604711488d libnm: avoid loosing signals
D-Bus has an upper limit on number of Match rules and it's rather easy
to hit as the proxy likes to add one for each object. Let's remove the Match
rule the proxy added and ensure a less granular rule is present instead.

Ideally, we should be able to tell glib not to hook its rules.
Related: https://bugzilla.gnome.org/show_bug.cgi?id=758749

https://bugzilla.gnome.org/show_bug.cgi?id=758751
2015-12-01 14:51:13 +01:00
Dan Williams
b023d0754b exported-object: add support for DBus ObjectManager interface
NMExportedObject now derives from GDBusObjectSkeleton, which is what
GDBusObjectManagerServer wants.  The main GDBusConnection and each
private server connection now gets a new GDBusObjectManagerServer,
and exported objects are registered with that instead of individually
exporting each GDBusInterfaceSkeleton.

Previously exported objects were not referenced by the BusManager,
but instead removed from the exports hash via weak references.  The
GDBusObjectManagerServer instead references exported objects, which
can make them live much longer than they did before.

Co-Authored-By: Thomas Haller <thaller@redhat.com>
2015-11-18 15:15:05 +01:00
Lubomir Rintel
e9c88ba9de dbus: add strongswan to the vpn plugin bus names 2015-10-23 12:05:48 +02:00
Lubomir Rintel
a426f7f396 dbus: don't do <deny send_interface="..." /> in dbus service file
It does more than intended; apart from denying messages to that particular
interface it also denies all messages non-qualified with an interface globally.
From the dbus-daemon manual:

  Be careful with send_interface/receive_interface, because the
  interface field in messages is optional. In particular, do NOT
  specify <deny send_interface="org.foo.Bar"/>! This will cause
  no-interface messages to be blocked for all services, which is almost
  certainly not what you intended. Always use rules of the form: <deny
  send_interface="org.foo.Bar" send_destination="org.foo.Service"/>

We can just safely remove those rules, since we're sufficiently protected
by the send_destination matches and method calls are disallowed by default
anyway.
2015-10-23 12:05:47 +02:00
Lubomir Rintel
b0ba25cdbc dbus: allow talking to fortisslvpn plugin 2015-10-06 17:31:50 +02:00
Lubomir Rintel
82031add33 dbus: allow talking to more plugins in DBus policy
These two has been seen in the wild.
Libreswan is the RHEL's openswan fork.
2015-08-27 15:11:52 +02:00
Jiří Klimeš
2c299ba65c dbus: increase 'max_replies_per_connection' limit in D-Bus configuration
D-Bus default limit of replies per connection has been lowered to 128 due to
CVE-2014-3638, see:
http://cgit.freedesktop.org/dbus/dbus/commit/?id=5bc7f9519ebc6117ba300c704794b36b87c2194b
https://bugs.freedesktop.org/show_bug.cgi?id=81053

The limit seems to be too low and causes problems in libnm-glib, that will not
return all NetworkManager connection profiles if there are too many of them
(roughly more than the limit). As a consequence, libnm-glib based clients will
not work properly.

Lets increase the limit in our D-Bus org.freedesktop.NetworkManager.conf
configuration as we had it before.

See also older commit d5b31d55fa that did the
opposite thing (removing the limit because the default D-Bus limit was 8192 at
that time).
2015-05-29 08:04:26 +02:00
Dan Williams
231b0390a5 vpn: convert NMVpnConnection <-> VPN service communication to GDBus (bgo #745307)
Of special note is the new D-Bus rule to allow root to talk to
org.freedesktop.NetworkManager.VPN.Plugin, without which NetworkManager
would not hear signals from the VPN plugins.  Oddly, this worked
fine with dbus-glib...

https://bugzilla.gnome.org/show_bug.cgi?id=745307
2015-03-03 15:04:46 -06:00
Dan Williams
7e0f94f0f5 dbus: kill at_console usage in permissions (bgo #707983) (rh #979416)
at_console permissions as implemented by D-Bus have some problems:

1) it is now fully redundant with PolicyKit and session tracking via
systemd/ConsoleKit

2) it uses a different mechanism than PolicyKit or systemd to determine
sessions and whether the user is on local or not (pam_console)

3) it was never widely implemented across so removing it
harmonizes D-Bus permissions on all supported distros

To that end, remove the at_console section of the D-Bus permissions,
and rely on session-tracking and PolicyKit to ensure operations are
locked down.

No changes are being made to PolicyKit or session-tracking, so any
operations denied by those mechanisms are still denied, and no
permissions are being relaxed.  Instead, this should allow remote
users who log in via remote desktop or SSH to inspect network state,
change connection parameters, and start/stop interfaces.  Obviously
if you are remote, you should not touch the interface which your
connection is using, but that concern shouldn't prevent all the other
nice stuff that you can do with NM.

https://bugzilla.gnome.org/show_bug.cgi?id=707983
https://bugzilla.redhat.com/show_bug.cgi?id=979416
2014-01-23 16:48:19 -06:00
Dan Fruehauf
ee0f70cfd7 dbus: allow communication with NetworkManager-iodine VPN plugin 2013-12-12 10:53:34 -06:00
Dan Fruehauf
edd1ebe8a0 dbus: allow talking to the NetworkManager-SSH VPN plugin 2013-03-20 08:28:14 -05:00
Jiří Klimeš
d5b31d55fa dbus: remove 'max_replies_per_connection' limit from D-Bus configuration
It is leftover from times when D-Bus default limit was 32. Now, it is 8192, see
http://cgit.freedesktop.org/dbus/dbus/commit/?id=8d3d8ff55739eebd84d0d53a20a025329feafc3b
See also https://bugs.freedesktop.org/show_bug.cgi?id=50264
2012-05-23 10:37:19 +02:00
Dan Williams
89bf692c08 dbus: fix Modem interface permissions
Doesn't really matter since everything to NM is allowed in the
at_console block, but just for correctness fix it.
2012-05-14 14:50:17 -05:00
Dan Williams
7735b8d72f dbus: rename conf file to match current conventions 2011-12-12 19:31:11 -06:00
Renamed from src/NetworkManager.conf (Browse further)