Commit Graph

8762 Commits

Author SHA1 Message Date
Dan Williams
99fb844657 core: device disconnection cleanups
Return an error when trying to disconnect an already-disconnected
or deactivated device.
2009-09-18 09:05:11 -07:00
Dan Williams
7239863d8f libnm-glib: make nm_device_disconnect() async 2009-09-18 08:38:29 -07:00
Alexander Sack
109f7e772a libnm-glib: add nm_device_disconnect function to glib API 2009-09-18 17:06:53 +02:00
Alexander Sack
2be94b44c3 core: implement manual disconnect feature
In the past networkmanager did not allow to manually disconnect devices.

Manually disconnected devices will not be automatically reconnected until one
of the following events occur:
 1. user activates a connection for the currently disconnected device
 2. network manager awakes from hibernate/suspend
 3. network manager is restarted (e.g. reboot)

Add a Disconnect method to generic NMDevice dbus interface; set a new private
autoconnect_inhibit flag if Disconnect method is called through dbus.
Based on this auto activation for devices gets inhibited until one
of the above events occur.
2009-09-18 17:06:48 +02:00
Dan Williams
fdb5ef29c1 nm-tool: don't depend on private NM includes 2009-09-17 14:07:53 -07:00
Dan Williams
9b7d537b65 Merge commit 'origin/master' into cert-paths 2009-09-17 11:24:56 -07:00
Dan Williams
3ce6b68c64 vpn: fix crash caused by 8d205212dc
Typo; should have been 'unref'.
2009-09-17 11:23:44 -07:00
Dan Williams
99e5a86394 system-settings: handle byte-array secrets too 2009-09-17 10:38:54 -07:00
Dan Williams
492eb70f75 libnm-glib: fix getting remote secrets 2009-09-16 13:50:35 -07:00
Dan Williams
7e7cfbd946 libnm-util: verify private keys with passwords; pkcs#12 crash fix
For private keys, don't just verify that the key can be read; try to
decrypt it to ensure that the password is actually valid.

Also fix a stupid {} mistake that caused crashes when setting pkcs#12
certificates because the check for PATH scheme wouldn't happen and
the private key would be NULL when trying to set the client cert to
the same data as the private key.
2009-09-16 12:42:52 -07:00
Dan Williams
9f8f2a2dd9 libnm-util: clarify certificate/key path argument usage
In the future we'll allow cert/key IDs too, so don't lock ourselves
into filenames, but use the 'scheme' argument to specify what 'value'
means.
2009-09-16 10:30:31 -07:00
Dan Williams
8c35e96b60 libnm-util: add nm_utils_rsa_key_encrypt() and fix crypto padding mixups
To be backwards compatible clients need to handle both paths to private
keys and the decrypted private key data, which is what used to get passed
in the private-key and phase2-private-key attributes of the 802.1x setting.
When moving a connection around between system-settings and user-settings,
if the private key is decrypted data, the settings service needs to store
that decrypted data somewhere so that the key can be sent to NM during
the connection process.

But we don't want to store the decrypted private key data, so we have to
re-encrypt it (possibly generating a private key password if one wasn't
sent with the decrypted data) and save it to disk, then send NM a path
to that private key during connection.

To help clients do this, and so that they don't have to carry around
multiple crypto implementations depending on whether they want to use
NSS or gnutls/gcrypt, add a helper to libnm-util.

Furthermore, I misunderstood a bunch of stuff with crypto padding when
writing the encrypt/decrypt functions long ago, so fix that up.  Don't
return padding as part of the decrypted data, and make sure to verify
the padding's expected lengths and values when decrypting.  Many thanks
to Nalin Dahyabhai for pointing me in the right direction.
2009-09-15 16:01:50 -07:00
Dan Williams
a371951fbc ifcfg-rh: clarify comment 2009-09-14 21:04:19 -07:00
Dan Williams
fd65c21712 Merge commit 'origin/master' into cert-paths 2009-09-14 19:34:25 -07:00
Philip Withnall
668b84e201 po: update British English (en_GB) translation (bgo #595072) 2009-09-14 14:28:20 -07:00
Dan Williams
4e9f388376 Merge commit 'origin/master' into cert-paths 2009-09-14 13:38:19 -07:00
Dan Williams
7a2e2cfda3 core: rename nm_device_can_activate -> nm_device_is_available
Becuase when the device is in >= DISCONNECTED state, that already
means it can activate if a connection is available.
2009-09-14 13:33:06 -07:00
Dan Williams
393bdd3737 core: generalize unavailable -> disconnected delayed transition
Instead of doing this in every device subclass, do it in the NMDevice
superclass.  nm_device_can_activate() already did the same logic that
each of the subclass device_state_changed() handlers were doing to
figure out whether they could do the transition from unavailable
to disconnected, so just use that in NMDevice and kill lots of code.
2009-09-14 13:24:29 -07:00
Dan Williams
f01c565230 build: remove nm-gsm-device.c
No idea why this is still around; it's a left-over from 0.7.x and
replaced by src/modem-manager/nm-modem-gsm.c.
2009-09-14 13:22:46 -07:00
Dan Williams
0be66daa9a wired: get rid of nm_device_ethernet_get_carrier
Only used internally; just use priv->carrier instead
2009-09-14 12:54:09 -07:00
Dan Williams
ab167b1994 ethernet: clean up netlink monitoring code
Keep a reference to the netlink monitor for as long as we have
signals attached to it.  Also don't bother looking up the ifindex
in the carrier state signal handlers since we already have it
lying around in priv.
2009-09-14 12:15:15 -07:00
Dan Williams
1ab1fed169 libnm-glib-vpn: bump soname to match soname bump for libnm-glib
So that Debian can bump package name too.
2009-09-14 07:55:59 -07:00
Dan Williams
25d17ef341 core: always tear down devices when their hardware goes away
Previous connection-assumption code that made sure not to touch
ethernet devices when NM quit also didn't clean up after devices
that were physically removed, which was wrong.
2009-09-14 07:55:59 -07:00
Dan Williams
db588ed8e5 vpn: don't reset VPN gateway route when parent device is going down
Or really, any time the parent IP4 config is cleared which is pretty
much only when the device is going down.  Avoids a warning when
nm_system_add_ip4_vpn_gateway_route() can't get the parent IP4Config
because it doesn't exist.
2009-09-14 07:55:59 -07:00
Dan Williams
4c77fa0862 po: rename sr@Latn -> sr@latin (bgo #555863) 2009-09-11 09:02:20 -04:00
Shankar Prasad
f1dc359bac po: add Kannada (kn) translation (bgo #585826) 2009-09-11 08:56:33 -04:00
Krishna Babu K
aa0536b262 po: add Telugu (te) translation (bgo #585553) 2009-09-11 08:54:21 -04:00
Amitakhya Phukan
3b975055e8 po: update Assamese (as) translation (bgo #585537) 2009-09-11 08:51:42 -04:00
Sweta Kothari
6b2754d6d1 po: updated Gujarati (gu) translation (bgo #585111) 2009-09-11 08:49:50 -04:00
Runa Bhattacharjee
267ba9c0d7 po: add Bengali (bn_IN) translation (bgo #585067) 2009-09-11 08:46:20 -04:00
Francesco Marletta
ddf8818a3f po: update Italian translation (bgo #575041) 2009-09-11 08:43:10 -04:00
Sandeep Shedmake
32fbee1487 po: update Marathi translations (bgo #573729) 2009-09-10 22:15:54 -04:00
Dan Williams
f86d6c441b po: add missing translatable 2009-09-10 22:15:22 -04:00
Piotr Drąg
0cfd50664b po: updated Polish translation (bgo #594577) 2009-09-10 21:23:48 -04:00
Daniel Nylander
cb4f017856 po: updated Swedish translation (bgo #594203) 2009-09-10 21:22:03 -04:00
Aron Xu
da0d093c60 po: Updated Simplified Chinese translation (bgo #594310) 2009-09-10 21:18:58 -04:00
Aron Xu
e8e796957d po: update Simplified Chinese translation (bgo #593774) 2009-09-10 21:18:55 -04:00
Dan Williams
985ccfe7ad doc: fix FSF address (bgo #575625) 2009-09-10 21:03:30 -04:00
Dan Williams
8d205212dc vpn: fix crash when canceling VPN connection secrets request
The secrets provider might be unrefed while processing the response,
causing a double-free when the unref triggers the weak ref notifier
and clears out the GetSecretsInfo, but then later the dbus handler
that got the response in the first place tries to free the info
explicitly.  So keep the provider around while processing the result.
2009-09-10 12:18:18 -07:00
Noel J. Bergman
aced7c25c2 policy: reschedule failed devices for activation after a short delay
Instead of immediately...  devices handled externally from NM (by
ModemManager or Bluez or whatever) have a slight delay in reporting
to NM that they device has been removed (due to internal housekeeping
and then pushing the event into D-Bus signals or something) and thus
when NM notices PPP failures and tries to reschedule activation
of autoconnect=true connections, it fails the reactivation because
the device actually is no longer present, but it hasn't gotten the
device-removed event from MM or Bluez yet.  That sets the invalid
tag on the connection, and when the device gets replugged, the
invalid tag suppresses autoconnect.
2009-09-09 17:19:39 -07:00
Dan Williams
9b55936dee device: only invalidate connections if they failed during activation
Otherwise, connections used to get marked invalid on hot-unplug, which
isn't really correct.
2009-09-09 12:21:55 -07:00
Dan Williams
f28a0df4a6 ppp: ignore certain pppd status changes
We don't actually care when pppd goes into the 'network' phase or the
'authenticate' phase, because we're looking for the IP4 configuration
to come back, and the device is already in the IP_CONFIG state.
Handling those phases would cause the device's state to jump around
between NEED_AUTH and IP_CONFIG when we were already past that phase.

Specifically, when the PPP link went down, the device would jump from
FAILED to IP_CONFIG because pppd entered the 'network' phase when
cleaning up the link.  The device would also jump from IP_CONFIG to
NEED_AUTH during the connection process when we already had secrets.
2009-09-09 07:44:21 -07:00
Dan Williams
222869a7ef include: number device activation stages in NetworkManager.h 2009-09-09 07:11:29 -07:00
Dan Williams
bee58e359d modem: disable modem instead of just disconnecting
Until later when we'll actually do stuff like probing signal
strength and such while disconnected.
2009-09-04 17:42:09 -05:00
Alexander Sack
eeec1021b2 ifupdown: do not export any connection in managed=false mode - lp:291902 2009-09-04 18:02:24 +02:00
Alexander Sack
801203c3aa ifupdown: support mappings and don't track devices not referenced in any stanza lp:291564 2009-09-04 17:53:43 +02:00
Alexander Sack
2e912158af core: ensure that modem-manager claimed data devices are ignored
add function nm_modem_manager_has_modem_for_iface to modem-manager api
and ignore device additions in nm-manager if the iface is claimed by
modem-manager; also forget about already managed devices once they get
claimed by modem-manager.
2009-09-04 16:55:48 +02:00
Dan Williams
e5ed391f28 libnm-util: allow certificate/key paths
Overload the certificate and key properties to allow paths to the
certificates and keys using a special prefix for the property data.
Add API to libnm-util for easy certificate path handling, and
documentation for NMSetting8021x.
2009-09-04 09:07:00 -05:00
Dan Williams
cecf8f64c7 ifupdown: fix regression locking connections to their interfaces (lp #424092)
Reported and tirelessly tested by Noel Bergman <noel@devtech.com>
2009-09-03 20:43:26 -05:00
Dan Williams
74f125b44e doc: add new settings and fix 'make clean' 2009-08-31 00:50:02 -05:00