NetworkManager/src/settings
Thomas Haller 8d3ead72fd settings: no longer honor read-only flag to prevent modifying connection profiles
Note that we now support keyfiles from read-only storage in /usr/lib.
Note also that we do support modifying and deleting these profiles.
That works by placing a shadowing profile to /etc or /run.

Surely this is questionable. It means that once the user uses D-Bus
to modify/delete a profile in /usr/lib, that profile becomes forever
shadowed by a different file, and there is no D-Bus API to return
to the original file. The user would have to drop the shadowing storages
from the file system. That is a problem.

But on the other hand, disallowing changes to such read-only profiles
is not very useful either. If you no longer can use D-Bus to modify such
profiles, what's the value here? How are applications supposed to handle
such profiles if there is no D-Bus API to do something sensible to them?

So, whatever problems read-only profiles and this shadowing causes, I don't
think that the solution is to entirely disallow changes via D-Bus.

At that point, we can just as well allow changes to profiles from
ifupdown. Note that you still cannot modify the profile directly (as the
ifupdown plugin does not support that). But you can delete the profile
(either temporarily via a tombstone in /run or permanently via a
tombstone in /etc). You also can make the profile in-memory, and take
it from there. Note that if you try to later store the in-memory profile
to disk again, then it depends on the order of settings plugins whether
that succeeds. If you have "plugins=keyfile,ifupdown", then the profile
will be stored as keyfile to /etc. If you have "plugins=ifupdown,keyfile",
then the modification will only be done in /run and the "to-disk" command
silently ignored (there really is no better solution).
2019-07-25 23:27:49 +02:00
..
plugins settings: no longer honor read-only flag to prevent modifying connection profiles 2019-07-25 23:27:49 +02:00
nm-agent-manager.c all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-agent-manager.h all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-secret-agent.c all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-secret-agent.h all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-settings-connection.c settings: no longer honor read-only flag to prevent modifying connection profiles 2019-07-25 23:27:49 +02:00
nm-settings-connection.h settings: track profiles on disk that are shadowed by in-memory connections 2019-07-25 23:27:49 +02:00
nm-settings-plugin.c settings: add nm_settings_plugin_cmp_by_priority() function 2019-07-17 12:51:26 +02:00
nm-settings-plugin.h settings: add nm_settings_plugin_cmp_by_priority() function 2019-07-17 12:51:26 +02:00
nm-settings-storage.c settings: add nm_settings_plugin_cmp_by_priority() function 2019-07-17 12:51:26 +02:00
nm-settings-storage.h settings: rework tracking settings connections and settings plugins 2019-07-16 19:09:08 +02:00
nm-settings-utils.c settings: rework tracking settings connections and settings plugins 2019-07-16 19:09:08 +02:00
nm-settings-utils.h settings: rework tracking settings connections and settings plugins 2019-07-16 19:09:08 +02:00
nm-settings.c settings: track profiles on disk that are shadowed by in-memory connections 2019-07-25 23:27:49 +02:00
nm-settings.h core,libnm: add AddConnection2() D-Bus API to block autoconnect from the start 2019-07-25 15:26:49 +02:00