mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 02:30:08 +01:00
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 git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3290 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
parent
d4d882ae1c
commit
1065f22f02
2 changed files with 22 additions and 5 deletions
|
|
@ -1,3 +1,11 @@
|
|||
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
|
||||
|
||||
2008-02-04 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
* system-settings/src/Makefile.am
|
||||
|
|
|
|||
|
|
@ -422,7 +422,7 @@ make_wireless_security_setting (shvarFile *ifcfg,
|
|||
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 @@ make_wireless_security_setting (shvarFile *ifcfg,
|
|||
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 @@ parser_parse_file (const char *file, GError **error)
|
|||
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 @@ parser_parse_file (const char *file, GError **error)
|
|||
|
||||
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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue