summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-02-21 11:23:59 +0100
committerThomas Haller <thaller@redhat.com>2017-02-21 12:17:30 +0100
commit9b8e56180f21d7d877380021a40605b7e0717cb8 (patch)
treede23ac99b631e30d11c025429d909142142c69da
parentb1c8c9cbaf54b7ee076e99db29c6e5127944d4f2 (diff)
downloadNetworkManager-9b8e56180f21d7d877380021a40605b7e0717cb8.tar.gz
ifcfg: don't g_strstrip() value in read_dcb_bool_array()
Ifcfg reader now properly handles escaping and quoting. We don't need to stip whitespace, if somebody explicitly configures prop=" value" it is a configuration error.
-rw-r--r--src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c
index b60ef82f4d..19a0552c4b 100644
--- a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c
+++ b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c
@@ -1829,7 +1829,6 @@ read_dcb_bool_array (shvarFile *ifcfg,
return TRUE;
}
- val = g_strstrip (val);
if (strlen (val) != 8) {
PARSE_WARNING ("%s value '%s' must be 8 characters long", prop, val);
g_set_error_literal (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_INVALID_CONNECTION,
@@ -1874,7 +1873,6 @@ read_dcb_uint_array (shvarFile *ifcfg,
return TRUE;
}
- val = g_strstrip (val);
if (strlen (val) != 8) {
PARSE_WARNING ("%s value '%s' must be 8 characters long", prop, val);
g_set_error_literal (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_INVALID_CONNECTION,
@@ -1924,7 +1922,6 @@ read_dcb_percent_array (shvarFile *ifcfg,
return TRUE;
}
- val = g_strstrip (val);
split = g_strsplit_set (val, ",", 0);
if (!split || (g_strv_length (split) != 8)) {
PARSE_WARNING ("invalid %s percentage list value '%s'", prop, val);