NetworkManager r3290 - in trunk: . system-settings/plugins/ifcfg-fedora
- From: dcbw svn gnome org
- To: svn-commits-list gnome org
- Subject: NetworkManager r3290 - in trunk: . system-settings/plugins/ifcfg-fedora
- Date: Mon, 4 Feb 2008 23:18:16 +0000 (GMT)
Author: dcbw
Date: Mon Feb 4 23:18:16 2008
New Revision: 3290
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=3290&view=rev
Log:
2008-02-04 Dan Williams <dcbw redhat com>
* system-settings/plugins/ifcfg-fedora/parser.c
- (make_wireless_security_setting): fix spelling; unencrypted networks
need key_mgmt set too
- (parser_parse_file): validate ifcfg file name and don't try to parse
.bak files; ensure that an error is set whenever NULL gets returned
Modified:
trunk/ChangeLog
trunk/system-settings/plugins/ifcfg-fedora/parser.c
Modified: trunk/system-settings/plugins/ifcfg-fedora/parser.c
==============================================================================
--- trunk/system-settings/plugins/ifcfg-fedora/parser.c (original)
+++ trunk/system-settings/plugins/ifcfg-fedora/parser.c Mon Feb 4 23:18:16 2008
@@ -422,7 +422,7 @@
s_wireless_sec->wep_tx_keyidx = key_idx;
else {
g_set_error (error, ifcfg_plugin_error_quark (), 0,
- "Invalid defualt WEP key '%s'", value);
+ "Invalid default WEP key '%s'", value);
g_free (value);
goto error;
}
@@ -450,8 +450,8 @@
g_free (lcase);
}
- if (have_key)
- s_wireless_sec->key_mgmt = g_strdup ("none");
+ // FIXME: unencrypted and WEP-only for now
+ s_wireless_sec->key_mgmt = g_strdup ("none");
return NM_SETTING (s_wireless_sec);
@@ -672,9 +672,18 @@
char *type;
char *nmc = NULL;
NMSetting *s_ip4;
+ char *ifcfg_name = NULL;
g_return_val_if_fail (file != NULL, NULL);
+ ifcfg_name = get_ifcfg_name (file);
+ if (!ifcfg_name) {
+ g_set_error (error, ifcfg_plugin_error_quark (), 0,
+ "Ignoring connection '%s' because it's not an ifcfg file.", file);
+ return NULL;
+ }
+ g_free (ifcfg_name);
+
parsed = svNewFile (file);
if (!parsed) {
g_set_error (error, ifcfg_plugin_error_quark (), 0,
@@ -698,8 +707,8 @@
if (!strcmp (lower, "no") || !strcmp (lower, "n") || !strcmp (lower, "false")) {
g_free (lower);
- // FIXME: actually ignore the device, not the connection
- g_message ("Ignoring connection '%s' because NM_CONTROLLED was false", file);
+ g_set_error (error, ifcfg_plugin_error_quark (), 0,
+ "Ignoring connection '%s' because NM_CONTROLLED was false.", file);
goto done;
}
g_free (lower);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]