NetworkManager/src/settings
Thomas Haller 9843da7ce5 ifcfg-rh: comment out invalid lines during svWriteFile
This is especially important because we don't support
line continuation. Thus, with

    FOO='val
      bar=3'
    wrong line
      F2=b
      F3='b
    XXX=adf'
      XXX2=val2
    '
we now write

    FOO=
    #NM: FOO='val
    bar=
    #NM:   bar=3'
    #NM: wrong line
      F2=b
    F3=
    #NM:   F3='b
    XXX=
    #NM: XXX=adf'
      XXX2=val2
    #NM: '

Basically, the writer will comment out any line that is

  - not all-whitespace
  - not a '#' comment (possibly proceeded by whitespace)
  - not a valid variable assignment

This avoids that writer writes lines that are not understood by
ifcfg-rh plugin, but interferes with initscripts. E.g.

  NAME=old-name'
  rm -rf /
  '

becomes

  NAME=new-name
  #NM: rm -rf /
  #NM: '
2016-11-09 12:07:35 +01:00
..
plugins ifcfg-rh: comment out invalid lines during svWriteFile 2016-11-09 12:07:35 +01:00
nm-agent-manager.c src: drop generated nm-src-enum-types.h 2016-10-22 17:16:17 +02:00
nm-agent-manager.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-inotify-helper.c core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-inotify-helper.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-secret-agent.c core: refactor private data for NMExportedObject and others 2016-10-03 12:04:14 +02:00
nm-secret-agent.h core: refactor private data for NMExportedObject and others 2016-10-03 12:04:14 +02:00
nm-settings-connection.c core: handle the autoconnect-retries property 2016-10-16 12:56:09 +02:00
nm-settings-connection.h core: refactor private data for NMExportedObject and others 2016-10-03 12:04:14 +02:00
nm-settings-plugin.c settings: set @error on failure of nm_settings_plugin_add_connection() 2016-03-03 18:54:20 +01:00
nm-settings-plugin.h all: cleanup includes in header files 2016-08-17 19:51:17 +02:00
nm-settings.c device: treat fake permanent MAC address mostly like a real one 2016-10-28 16:44:56 +02:00
nm-settings.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00