mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-27 22:10:09 +01:00
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.
This commit is contained in:
parent
2eede80108
commit
9f09ebd582
1 changed files with 7 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue