From b6c436d8d7ffb3d65140b359dabb885e999192f7 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Sun, 13 Feb 2011 00:21:41 -0600 Subject: [PATCH] libnm-util: reject detail in permissions for now Already did this in the permissions accessors, this mirrors that behavior in the GObject property setters. --- libnm-util/nm-setting-connection.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libnm-util/nm-setting-connection.c b/libnm-util/nm-setting-connection.c index 27e7913a73..e5bf413fb8 100644 --- a/libnm-util/nm-setting-connection.c +++ b/libnm-util/nm-setting-connection.c @@ -135,6 +135,9 @@ permission_new_from_str (const char *str) /* Ensure that somebody didn't pass "user::" */ g_return_val_if_fail (last_colon > str, NULL); + /* Reject :[detail] for now */ + g_return_val_if_fail (*(last_colon + 1) == '\0', NULL); + /* Make sure we don't include detail in the username */ ulen = last_colon - str; } else