• Lukas Märdian's avatar
    dbus: wait for 'netplan try' to be ready (LP: #1949893) (#245) · e19441c3
    Lukas Märdian authored
    netplan-dbus now waits for the spawned 'netplan try' child to touch the /run/netplan/netplan-try.ready stamp file before it returns the DBus call. If no stamp file is detected within up to 5 sec it hits a timeout and returns an error.
    
    Additionally, this PR places ephemeral netplan configs in /run/netplan/config-XXXXXX, to avoid potential exploits of tmpfiles, like https://lwn.net/Articles/250468/
    
    COMMITS:
    * test:dbus: some cleanup
    * test:utils: add touch() method to MockCmd
    * cli:try: add touch/clear_ready_stamp methods
    * dbus: wait for 'netplan try' to be ready
    netplan-dbus now waits for the spawned 'netplan try' child to touch the
    /tmp/netplan-try.ready stamp file before it returns the DBus call. If no
    stamp file is detected within up to 5sec it hits a timeout and returns an
    error.
    * cli:apply: some more time for NM to have all interfaces created
    * dbus:cli: move netplan-try.ready stamp file to /run/netplan
    to avoid potential expolits of tmpfiles, like https://lwn.net/Articles/250468/
    * dbus: move ephemeral netplan config states to /run/netplan
    to avoid potential expolits of tmpfiles, like https://lwn.net/Articles/250468/
    e19441c3