Just because the key isn't saved (ie, the user hasn't entered it yet,
or the user want to type it in every time) doesn't mean the setting isn't
WEP, so recognize it as WEP if DEFAULTKEY or SECURITYMODE is set.
Duh, AND-ing flags with 0 (which is NM_SETTING_SECRET_FLAG_SYSTEM_OWNED)
is always going to be FALSE... NM_SETTING_SECRET_FLAG_SYSTEM_OWNED is
special; because it's the default value if the key isn't present,
and at this point it's exclusive of all other flags. So (at least for
now) it's OK that it's 0 but we might want to change it later so that
NM_SETTING_SECRET_FLAG_SYSTEM_OWNED can actually be used as a flag.
Now that keyfile is built in, we may have symbol naming conflicts
with the other plugins where code was copied & pasted around. Fix
that by namespacing common function names in the keyfile plugin.
Thanks to Giovanni Campagna for pinpointing the issue.
Since settings storage is now handled by NetworkManager, we must
have the ability to read/write all connection types at all times.
Since the 'keyfile' plugin is the only plugin that can handle all
connection types, build it into NetworkManager.
If we find a "iface ..." line, add the interface to
well_known_interfaces no matter if there is a connection for it or not.
Otherwise we fail to mark devices as unmageded in cases like
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
as NM does not know how to parse such a interface configuration.
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=569215
Don't emit "unmanaged-specs-changed" signal in read_one_connection(),
because it causes that next connections are not listed (get_connections() is
called prematurely and only connections read so far are available).
Steps to reproduce the bug:
1) create ifcfg-fake
DEVICE=loremipsum
HWADDR=01:02:03:04:05:06
NM_CONTROLLED=no
2) restart NetworkManager
3) only connections read *before* ifcfg-fake are available
Thanks to Robert Vogelgesang <vogel@users.sourceforge.net> for updating
the patch and analysis!
GATEWAY0=0.0.0.0 was erroneously denied. Also, missing GATEWAY0 entry caused
ifcfg-rh plugin to regard the connection as invalid. The commit fixes that and
makes it behave in accordance with initscripts.
config.h defines _GNU_SOURCE, which in turn defines the bits necessary
for kill, isblank, and isascii. So wherever we use those, we need
to make sure config.h is included.