libnm-util: reject detail in permissions for now

Already did this in the permissions accessors, this mirrors that
behavior in the GObject property setters.
This commit is contained in:
Dan Williams 2011-02-13 00:21:41 -06:00
parent 57e928d4f8
commit b6c436d8d7

View file

@ -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