From 9f09ebd582977d285bd3296706bb5e90f06ced4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Fri, 6 Sep 2013 15:11:03 +0200 Subject: [PATCH] cli: forbid removing connection.uuid in editor We expect that UUID is set, else there are various errors. Anyway, users should not modify connection UUID. --- cli/src/settings.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cli/src/settings.c b/cli/src/settings.c index 6d7a7908e3..7e36e881b3 100644 --- a/cli/src/settings.c +++ b/cli/src/settings.c @@ -2053,6 +2053,11 @@ done: /* --- NM_SETTING_CONNECTION_SETTING_NAME property setter functions --- */ +#if 0 +/* + * Setting/removing UUID has been forbidden. + * Should it be enabled later, this function can be used. + */ static gboolean nmc_property_con_set_uuid (NMSetting *setting, const char *prop, const char *val, GError **error) { @@ -2065,6 +2070,7 @@ nmc_property_con_set_uuid (NMSetting *setting, const char *prop, const char *val g_object_set (setting, prop, val, NULL); return TRUE; } +#endif /* 'permissions' */ /* define from libnm-util/nm-setting-connection.c */ @@ -3821,7 +3827,7 @@ nmc_properties_init (void) NULL); nmc_add_prop_funcs (GLUE (CONNECTION, UUID), nmc_property_connection_get_uuid, - nmc_property_con_set_uuid, + NULL, /* forbid setting/removing UUID */ NULL, NULL, NULL);