core: refactor nm_utils_complete_generic() not to use a dynamic format string

For NMDeviceWifi and NMDeviceWimax, the printf format string for
nm_utils_complete_generic() was created based on ssid/nsp. Since
these input strings are untrusted, this is a serious bug.

Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
Thomas Haller
2014-08-25 16:21:59 +02:00
parent 6de4a548df
commit ed20177d27
16 changed files with 39 additions and 31 deletions

View File

@@ -102,8 +102,8 @@ const char *nm_utils_get_ip_config_method (NMConnection *connection,
void nm_utils_complete_generic (NMConnection *connection,
const char *ctype,
const GSList *existing,
const char *format,
const char *preferred,
const char *fallback_prefix,
gboolean default_enable_ipv6);
char *nm_utils_new_vlan_name (const char *parent_iface, guint32 vlan_id);