This allows the necessary flexibility when handling secrets; otherwise
it wouldn't be known when NM should save secrets returned from agents
to backing storage, or when the agents should store the secrets. We
can't simply use lack of a secret in persistent storage as the indicator
of this, as (for example) when creating a new connection without
secrets the storage method would be abmiguous.
At the same time, fold in "always ask" functionality for OTP tokens
so user agents don't have to store that attribute themselves out-of-band.
APNs can only contain alphanumeric characters, '.', and '-'. To be
helpful we strip spaces off before setting the APN internally so that
previously (and incorrectly) valid APNs don't cause the whole
connection to fail validation and thus disappear. The only case seen
in the wild was a Pelephone IL APN which erroneously had a trailing
space in the mobile broadband provider database. Bad characters
cause the connection to fail with vague error messages about being
unable to activate the PDP context during PPP negotiation.
NM didn't pass it to MM anyway, so it was mainly unused, but the band settings
were still wrong. Fix that (and still preserve ABI) by adding a new property
for allowed bands that can actually hold all the bands instead of limiting
to 16-bits. Clean up some of the deprecation stuff at the same time to make
it clearer what's deprecated and what to do about it.
This caused the 'autoconnect' property of NMSettingConnection to not
get updated in some cases (as when a system setting plugin noticed a
change to autoconnect=true and emitted the Updated signal, which wouldn't
contain the new value). Add a testcase for setting default values too.
* libnm-util/nm-setting-cdma.c
libnm-util/nm-setting-gsm.c
- (verify): validate username & password if they exist
- (need_secrets): if username given, require a password too
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3892 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Add a GError argument to nm_connection_verify() and nm_setting_verify(),
and add error enums to each NMSetting subclass. Each NMSetting subclass now
returns a descriptive GError when verification fails.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3751 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-device.c
src/nm-device.h
- (device_activation_precheck, check_connection_complete): remove this
virtual function; incomplete connections should be invalid by
definition, complete-ness should be checked in the setting's
verify function
* src/nm-serial-device.c
src/nm-gsm-device.c
- (real_check_connection_complete): remove
* libnm-util/nm-setting-serial.c
- (verify): new function; ensure there is a PPP setting too
* libnm-util/nm-setting-gsm.c
- (verify): ensure there is a serial setting too
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3225 4912f4e0-d625-0410-9fb7-b9a5a253dbdc