Commit Graph

376 Commits

Author SHA1 Message Date
Dan Williams
899b8a40dc libnm-util: NM_SETTING_SECRET_FLAG_SYSTEM_OWNED -> NM_SETTING_SECRET_FLAG_NONE
Make it a bit clearer that this value is not actually a value that
can be used as a flag, since its 0x00.
2011-02-06 23:37:39 -06:00
Dan Williams
382cdfaf1e keyfile: namespace potentially conflicting symbols
Just in case.
2011-02-04 15:59:45 -06:00
Dan Williams
da47a2add4 ifcfg-rh: recognize WEP connections even if they dont have WEP keys yet
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.
2011-02-02 16:50:58 -06:00
Dan Williams
5bc105e139 ifcfg-rh: don't save agent-owned or always-ask secrets 2011-01-31 20:35:37 -06:00
Dan Williams
d95280756f keyfile: fix flags check for writing secrets
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.
2011-01-31 19:20:16 -06:00
Dan Williams
d391e1fac3 keyfile: don't save agent-owned or always-ask secrets 2011-01-31 14:06:18 -06:00
Dan Williams
b3959aefa3 core: rename NMSysconfigConnection -> NMSettingsConnection 2011-01-26 11:38:12 -06:00
Dan Williams
b7259fd2a8 Merge remote branch 'origin/master' into rm-userset 2011-01-25 15:41:03 -06:00
Dan Williams
1e3a6c1311 ifcfg-rh: fix possible uninitialized variable usage 2011-01-24 15:55:10 -06:00
Dan Williams
a74189fd04 ifcfg-rh: fix possible uninitialized variable usage 2011-01-24 15:48:35 -06:00
Dan Williams
519b1ea61d keyfile: namespace commonly-named functions (bgo #639537)
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.
2011-01-18 13:22:00 -06:00
Dan Williams
e041fabcfd ifcfg-rh: don't try to parse non-ifcfg files at startup 2011-01-17 23:12:24 -06:00
Dan Williams
3e8547ff1b ifcfg-rh: fix crash on ignored file change
Don't crash when a file we don't care about changes.
2011-01-17 23:11:51 -06:00
Dan Williams
b38f39cfc6 core: build keyfile plugin into NetworkManager
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.
2011-01-12 18:12:23 -06:00
Dan Williams
f9ceafd4a1 Merge remote branch 'origin/master' into rm-userset 2011-01-12 15:46:37 -06:00
Mu Qiao
aaa54c65a8 ifnet: fix memory leak; handle file format changes 2011-01-11 12:33:37 -06:00
Radek Vykydal
b46cf443c0 ifcfg-rh: respect GATEWAYDEV for ibft/iSCSI configs too (rh #665027) 2011-01-11 09:54:29 -06:00
Dan Williams
16a8a951e9 ifcfg-rh: PSK isn't necessary for valid WPA connection
We'll ask secret agents for it if it's not stored in the connection.
2010-12-14 15:26:40 -06:00
Dan Williams
ff101f4946 settings: remove callback from nm_sysconfig_connection_get_secrets()
No reason it needs to use the callback pattern anymore.
2010-12-12 21:17:34 -06:00
Michael Biebl
898e08eef1 ifupdown: Allow to mark bridge ports as unmanaged (debian #530335)
Parse bridge configurations in /etc/network/interfaces and add
interfaces defined via bridge_ports to well_known_interfaces. This
allows to mark those interfaces as unmanaged if managed=false.
The "all" keyword and regexes are not supported and simply skipped.

Example:
iface br0 inet manual
	bridge_ports eth0 eth1 (→ eth0/1 will be marked as unmanaged)

See also:
http://manpages.ubuntu.com/manpages/maverick/man5/bridge-utils-interfaces.5.html

Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=530335
2010-12-09 00:15:17 -06:00
Michael Biebl
1939209759 ifupdown: Correctly mark unmanaged devices (debian #569215)
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
2010-12-09 00:13:37 -06:00
Andrey Borzenkov
bfbf5ef374 ifcfg-rh: fix missing connections when an unmanaged interface was present
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!
2010-12-06 15:55:48 +01:00
Jiří Klimeš
6903571160 ifcfg-rh: allow missing and 0.0.0.0 GATEWAYn lines in ifcfg-routes (rh #647992)
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.
2010-11-24 17:24:28 +01:00
Jiří Klimeš
8c9a124e72 keyfile: allow uppercase MAC addresses in unmanaged-devices in config file (rh #654714) 2010-11-23 16:33:11 +01:00
Dan Williams
3391a00354 core: fix up merge damage 2010-11-16 18:23:27 -06:00
Dan Williams
cfaa80b261 Merge remote branch 'origin/master' into rm-userset 2010-11-16 18:08:48 -06:00
Jiří Klimeš
d32a29ec52 ifcfg-rh: quiet ifcfg-rh plugin when re-read connection is the same as in-memory one
It occurs, for example, when NM updates connection's timestamp.
2010-11-10 17:28:36 +01:00
Jiří Klimeš
0376f6b1ce keyfile: ignore temporary files (bgo #602868)
Ignore temporary files created by vim editor and temporary files created
internally by g_file_set_contents() (mkstemp()) when writing connections.
2010-11-10 16:21:25 +01:00
Dan Williams
c580444fd7 keyfile: quiet keyfile plugin when re-read connection is the same as in-memory one
It occurs, for example, when NM updates connection's timestamp.
2010-11-10 16:14:51 +01:00
Dan Williams
e8da63889b keyfile: create keyfile data directory during install
So distributions don't have to do it.
2010-11-08 09:07:08 -06:00
Jiří Klimeš
579ec4e026 ifcfg-rh: remove unused D-Bus calls from ifcfg-rh tests 2010-11-08 11:34:26 +01:00
Ozan Çağlayan
6fd3c0d576 keyfile: remove unused D-Bus calls from test-keyfile.c 2010-11-08 11:26:51 +01:00
Jiří Klimeš
6e067a9d2b ifcfg-rh: ignore temporary files with ';[a-fA-F0-9]{8}' suffix created by rpm (rh #598203) 2010-11-02 12:15:54 +01:00
Dan Williams
b93cad0149 keyfile: propagate errors from updating new connection settings 2010-10-29 23:16:04 -05:00
Dan Williams
d3e640eacf ifcfg-rh: propagate errors from updating new connection settings 2010-10-29 23:15:38 -05:00
Dan Williams
034aee641a ifcfg-rh: fix possible warning
'added' won't always be valid, and thus the GObject typecast could fail.
Use a C typecast instead.
2010-10-29 23:14:42 -05:00
Dan Williams
c2ca4298fa ifcfg-rh: ensure connection is still alive for the removal signal 2010-10-29 16:58:07 -05:00
Dan Williams
37845af954 settings: return new connection object path from AddConnection
Finally.
2010-10-29 14:34:33 -05:00
Dan Williams
856a1c6b2c ifnet: fix memory leak 2010-10-29 14:01:22 -05:00
Dan Williams
28b17c8b4f ifnet: trivial cleanups 2010-10-29 13:58:23 -05:00
Dan Williams
8a6e2b6560 ifnet: constify tons of stuff
Use 'const char *' where appropriate.
2010-10-29 13:56:23 -05:00
Dan Williams
090329d0be ifnet: fix include name broken by 3f64bf5e36 2010-10-29 11:02:56 -05:00
Dan Williams
d1faa496d0 ifcfg-rh: remove unused UDI stuff 2010-10-28 09:29:16 -05:00
Dan Williams
3f64bf5e36 settings: rename NM_SYSCONFIG_SETTINGS_ERROR -> NM_SETTINGS_ERROR 2010-10-27 20:38:26 -05:00
Dan Williams
83ab4ec2ee settings: system-settings -> settings 2010-10-27 20:22:14 -05:00
Dan Williams
8f7aedc7e0 Merge remote branch 'origin/master' into rm-userset 2010-10-18 19:02:27 -05:00
Dan Williams
be97e7f104 build: include <config.h> for kill(2), isblank(3), and isascii(3)
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.
2010-10-08 22:46:55 -05:00
Jiří Klimeš
088454fcab ifcfg-rh: fix assertion failure when IP4 setting is missing while writing connection 2010-09-30 15:13:39 +02:00
Dan Williams
8b41f70dd5 Merge remote branch 'origin/master' into rm-userset 2010-09-27 10:30:46 -05:00
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