Commit Graph

271 Commits

Author SHA1 Message Date
Dan Williams
b80f31e191 trivial: typo fixes
Sent by a Debian user to Michael Biebl.  No other attribution
information available.  Thanks Debian user!
2010-09-25 00:34:10 -05:00
Dan Williams
98bd78c93b libnm-glib: better handling of missing user settings service
If it's not running or we can't spawn it (it's not supposed to be
autospawned anyway) we should just ignore the error and poke clients
that we've tried and failed to get user settings instead of warning
with an annoying message.
2010-08-10 15:47:55 -05:00
Dan Williams
d3b26a9c57 libnm-glib: get permissions synchronously at startup
Many clients using libnm-glib (often command-line ones like nm-tool
or nmcli) aren't long-lived enough for NM to get their UID from
the bus daemon and validate their permissions via PolicyKit.  So
when the NMClient object is created, get the permissions synchronously
(with a very low timeout to prevent unecessary blocking) to ensure
that the client is still on the bus when NM asks for it's credentials.

Avoids a ton of messages like:

NetworkManager[10274]: <warn> error requesting auth for org.freedesktop.NetworkManager.enable-disable-wwan: (6) Remote Exception invoking org.freedesktop.PolicyKit1.Authority.CheckAuthorization() on /org/freedesktop/PolicyKit1/Authority at name org.freedesktop.PolicyKit1: org.freedesktop.DBus.Error.NameHasNoOwner: Remote Exception invoking org.freedesktop.DBus.GetConnectionUnixUser() on / at name org.freedesktop.DBus: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get UID of name ':1.95': no such name
2010-08-10 00:47:26 -05:00
Dan Williams
2afcd8691b libnm-glib: fix retrieval of IPv6 addresses 2010-08-03 16:49:53 -07:00
Dan Williams
8053f42731 libnm-glib: fix retrieval of DHCP4 and DHCP6 options (rh #611141)
Busted since 2008 apparently.  Oops.
2010-08-03 16:39:37 -07:00
Pablo Castellano
ce5c0d5ac6 build: enable AM_SILENT_RULES (bgo #625263) 2010-08-03 12:58:46 -07:00
Dan Williams
fe869a35e6 libnm-glib: ensure invalids secrets hash isn't used on error condition
Apparently dbus-glib just sends through a random address for the
hash table even if 'error' is set.  Make sure we don't pass that down
to subclasses.
2010-07-21 15:37:53 -07:00
Dan Williams
1ba6dcacbf settings: add InvalidSetting error
To be used when the requested setting (for secrets, etc) doesn't
exist in the connection.
2010-07-21 15:37:00 -07:00
Dan Williams
664ccd4464 Revert "core: fix compilation on glib < 2.23.4"
This reverts commit 8a1fe31b31.

This commit was not intended to be pushed, as it's not ready yet
and isn't even my commit (thus attribution is wrong).
2010-07-12 18:20:09 -07:00
Dan Williams
8a1fe31b31 core: fix compilation on glib < 2.23.4
Where G_FILE_MONITOR_EVENT_MOVED isn't defined yet.
2010-07-02 10:42:32 -07:00
Dan Williams
4eea398b06 libnm-glib: fix invalid memory access during property notification
If an NMObject listened to property change notifications from
other NMObjects and then in response to that queued up other
property changes of it's own, those would get added to the
property change list that was being iterated through already.
Each name in the change list is freed after being notified,
but the change list itself is actually freed when all
properties have been notified.  So an object that queues up
another change notification ends up in _nm_object_queue_notify()
which iterates the change list where half of the data elements
are already freed...
2010-06-30 11:51:40 -07:00
Jiří Klimeš
aa104f9950 libnm-glib: fix handling of 'nameservers' property in NMIP6Config 2010-06-28 19:05:40 +02:00
Jiří Klimeš
1b49f941a6 core: MAC address spoofing/cloning (rh #447827) (bgo #553771)
This commit implements MAC cloning feature in NetworkManager. To support that,
'PermHwAddress' property is added into *.Device.Wired and *.Device.Wireless
interfaces. The permanent MAC address is obtained when creating the device, and
is used for 'locking' connections to the device. If a cloned MAC is specified
in connection to be activated, the MAC is set to the interface in stage1. While
disconecting, the permanent MAC is set back to the interface.
2010-06-22 14:21:25 +02:00
Dan Williams
6ab5a9597a libnm-glib: add IpInterface property 2010-06-10 10:21:19 -07:00
Dan Williams
716a9c6c0d core: add permissions framework for various operations (rh #585182) (bgo #619323) 2010-05-28 18:23:00 -07:00
Dan Williams
7ebf9641a0 libnm-glib: fix getting descriptions for some mobile broadband devices
3G devices can be 'net' subsystem too (ie, mbm, hso).
2010-05-25 13:57:20 -07:00
Dan Williams
1cd1a85eab libnm-glib: fix memory leak getting device descriptions 2010-05-25 13:56:56 -07:00
Dan Williams
fea6431a20 core/libnm-glib: implement better missing firmware support (rh #594578)
Track missing firmware and ensure the device can't be used when firmware
is missing.  Add a property for missing firmware so that clients can do
something intelligent with this information.
2010-05-25 10:52:25 -07:00
Dan Williams
6221afc790 libnm-glib: add nm_client_networking_get_enabled() (rh #589108) (bgo #346615)
Forgot this in the last commit.
2010-05-22 11:27:05 -07:00
Dan Williams
fa70542c61 core: add networking enable/disable knob distinct from sleep/wake (rh #589108) (bgo #346615)
Since forever we've used sleep/wake as the way to implement
Networking Enabled.  When the state file was introduced to make the
networking and wifi states persistent, we ran into a bug where
a failed suspend (like if the machine ran out of power while
suspended) would result in networking being disabled on reboot
since suspend/resume used the same knob as enable/disable.

This patch adds a distinct call for enable/disable networking
which changes the state file, while sleep/wake no longer change
the state file.
2010-05-22 09:51:22 -07:00
Dan Williams
16cda9fae1 libnm-glib: fix VPN plugin builds for C++
Yes, this breaks source compat.  Simple rename though.
2010-05-18 16:44:27 -07:00
Jiří Klimeš
5110fa7811 libnm-{util|glib}: fix headers to be C++ compatible - C_BEGIN_DECLS/C_END_DECLS (rh #592783) 2010-05-18 10:14:59 +02:00
Dan Williams
c3ebe98ae3 Merge remote branch 'origin/ip6only' 2010-04-26 17:33:45 -07:00
Dan Williams
0ad8fc1adc libnm-glib: use max timeout for settings dbus calls
These calls may require authentication, and thus could be in-progress
for much longer than the default D-Bus timeout, which is pretty short.
2010-04-25 22:48:10 -07:00
Dan Williams
eafb1a6725 Merge remote branch 'origin/master' into ip6only 2010-04-22 14:20:24 -07:00
Dan Williams
eeca251a27 core: return valid error to dbus-glib (rh #581794) 2010-04-22 12:39:48 -07:00
Dan Williams
6d6f7d3d90 core: ensure errors are dbus-glib accessible (rh #581794)
Errors that can possibly be returned from D-Bus method calls
need to be registered with dbus-glib.
2010-04-22 12:27:31 -07:00
Dan Williams
e2ad8c2a54 core: add 'default6' property for ActiveConnection objects
Since IPv4 and IPv6 have different routing one device can have the
active IPv4 connection and a completely different one can have the
active IPv6 one.
2010-04-15 15:18:08 -07:00
Jiří Klimeš
15351042ba libnm-glib: add 'vpn-state' and 'banner' properties to NMVPNConnection class
Without these properties, the errors like these occured:
  WARNING **: handle_property_changed: property 'vpn-state' changed but wasn't
  defined by object type NMVPNConnection.
2010-03-12 11:03:14 +01:00
Jiří Klimeš
f46a601022 libnm-glib-test: fix crash when a VPN connection is active and print its base connection 2010-03-12 10:49:59 +01:00
Dan Williams
9c9898091a libnm-glib: deprecate original libnm_glib bits
Been trying to move people off them for a long time, this makes
it official.
2010-03-10 09:18:08 -08:00
Dan Williams
bfcb57f1b9 Merge commit 'origin/master' into dhcp6 2010-01-22 12:06:04 -08:00
Dan Williams
02bebfd1f4 misc: more license fixes 2010-01-21 15:19:28 -08:00
Dan Williams
6400f5cb77 misc: license fixups
All libs are LGPL, all binaries are GPL.
2010-01-21 15:11:50 -08:00
Dan Williams
e21885e764 Merge commit 'origin/master' into dhcp6 2010-01-20 16:54:12 -08:00
Dan Williams
8720a74c2e build: pkg-config file fixes 2010-01-20 16:53:04 -08:00
Dan Williams
ac2505b64c Merge commit 'origin/master' into dhcp6 2010-01-20 15:42:26 -08:00
Jirka Klimes
7603f6dde4 libnm-util: fix NMDeviceBt hardware address property 2010-01-19 21:23:37 -08:00
Dan Williams
4f537c195c libnm-glib: add NMDHCP6Config class 2010-01-15 12:40:19 -08:00
Dan Williams
ec56c4d093 libnm-glib: add WWAN enable/disable support 2009-12-23 01:30:54 -08:00
Dan Williams
66994a18a3 libnm-glib: trivial documentation fixes 2009-11-23 15:02:56 -08:00
Dan Williams
c9d2d977dd libnm-glib: tighter warning print checks
Should be checking for dbus-glib errors of the right type,
instead of any error code (dbus-glib or not) that happens to be
4.
2009-10-20 12:10:30 -07:00
Dan Williams
3d194df94a libnm-glib: warning cleanups 2009-10-20 11:48:23 -07:00
Dan Williams
9e356dab83 libnm-glib: fix warning tearing down connections
GLib-CRITICAL **: g_hash_table_iter_next: assertion `ri->version == ri->hash_table->version' failed
2009-10-20 11:36:47 -07:00
Dan Williams
72a98c5b29 system-settings: fix crash saving default wired connections to backing storage (lp:430781)
Fix up refcounting, plus it turns out that we already have the MAC address
lying around as	a GObject data item, so	we don't need to go grab it
from the connection itself.
2009-10-05 17:46:16 -07:00
Dan Williams
866d48bb9b libnm-glib: add class padding for future expansion 2009-09-30 09:21:32 -07:00
Dan Williams
91bc44229e Merge commit 'origin/master' into cert-paths 2009-09-25 16:02:53 -07:00
Witold Sowa
b20cef2e1b libnm-glib: add 'connections-read' signal to settings interface
To let listeners know when all connections have been found.
2009-09-22 23:44:45 -07:00
Witold Sowa
ac03cbce04 libnm-glib: add service-running property to NMRemoteSettings
So that users can actually tell if the remote service is running or not.
It doesn't have to be when the object is created.
2009-09-22 23:29:02 -07:00
Dan Williams
c134460c9f Merge commit 'origin/master' into cert-paths 2009-09-18 09:09:03 -07:00