NetworkManager/src
Thomas Haller 15177a34be dns: change behavior for "rc-manager=symlink" to preserve "/etc/resolv.conf" as file
The purpose of "rc-manager=symlink" is so that the administrator can point
the "/etc/resolv.conf" as a symlink to a certain file, and thus indicating
that a certain component is responsible to manage resolv.conf, while others
should stay away from it.
For example, systemd-resolved never touches "/etc/resolv.conf", but
expects the admin to setup the symlink appropriately. It also recognizes
whether the symlink points to it's own resolv.conf in /run or to another
component.

Previously, "rc-manager=symlink" would always replace a regular file
with a symlink to "/var/run/NetworkManager/resolv.conf". Only if
"/etc/resolv.conf" is already a symlink somewhere else, NM would not
touch it. This with the exception that if "/etc/resolv.conf" points to
"/var/run/NetworkManager/resolv.conf", it would replace the symlink
with the same link to raise inotify events.

Change behavior so if "/etc/resolv.conf" is already a regular file, keep
it as file.
This means, if you have multiple components that don't care, everybody
can write the "/etc/resolv.conf" (as file) and there is no clear
expressed responsibility.
It was wrong that NetworkManager would convert the file to a symlink,
this should be reserved to the admin. Instead, NetworkManager should
accept that the intent is unspecified and preserve the regular file.
It's up to the admin to replace the symlink to somewhere else (to keep
NM off), or to point it to "/var/run/NetworkManager/resolv.conf", to show
the explicit intent.

The wrong behavior causes dangling symlinks when somebody disables
NetworkManager for good.

https://bugzilla.redhat.com/show_bug.cgi?id=1367551
2017-02-14 17:45:55 +01:00
..
devices wifi: introduce enum type NMSupplicantInterfaceState instead of plain int 2017-02-14 09:47:05 +01:00
dhcp dhcp: dhclient: reset the request list if conf file contains 'request' 2017-02-14 11:29:05 +01:00
dns dns: change behavior for "rc-manager=symlink" to preserve "/etc/resolv.conf" as file 2017-02-14 17:45:55 +01:00
dnsmasq build: don't add subdirectories to include search path but require qualified include 2016-11-21 14:26:37 +01:00
ndisc device: support dynamic "connection.stable-id" in form of text-substitution 2017-01-09 14:50:33 +01:00
platform platform: avoid printing "(null)" interface name during logging 2017-02-10 17:31:16 +01:00
ppp core: use cached GQuark and g_object_[gs]et_qdata() 2017-02-10 14:33:52 +01:00
settings core: define a full sort order for nm_settings_connection_cmp_timestamp() 2017-02-10 14:43:24 +01:00
supplicant wifi: introduce enum type NMSupplicantInterfaceState instead of plain int 2017-02-14 09:47:05 +01:00
systemd systemd: merge branch systemd into master 2017-02-06 13:45:51 +01:00
tests core: consolidate sorting of connections by autoconnect/timestamp 2017-02-10 14:43:24 +01:00
vpn all: cleanup switch fall-through comments for -Wimplicit-fallthrough warning 2017-02-06 16:45:20 +01:00
main-utils.c all: use O_CLOEXEC for file descriptors 2016-12-13 11:26:59 +01:00
main-utils.h all: cleanup includes in header files 2016-08-17 19:51:17 +02:00
main.c dns: fix shutdown to restore non-cached DNS config 2017-02-10 15:26:45 +01:00
NetworkManagerUtils.c build: don't add subdirectories to include search path but require qualified include 2016-11-21 14:26:37 +01:00
NetworkManagerUtils.h utils: inject platform into nm_utils_complete_generic() 2016-03-15 12:56:58 +01:00
nm-act-request.c act-request: return empty properties when not activated 2017-01-19 11:41:16 +01:00
nm-act-request.h act-request: allow omitting the @self argument in nm_act_request_cancel_secrets() 2016-12-20 15:53:41 +01:00
nm-active-connection.c device: refactor pending-action strings as named defines 2017-02-10 14:40:23 +01:00
nm-active-connection.h core: refactor private data for NMExportedObject and others 2016-10-03 12:04:14 +02:00
nm-audit-manager.c build: don't add subdirectories to include search path but require qualified include 2016-11-21 14:26:37 +01:00
nm-audit-manager.h build: don't add subdirectories to include search path but require qualified include 2016-11-21 14:26:37 +01:00
nm-auth-manager.c ip[46]-config/trivial: move code around 2017-01-16 17:24:36 +01:00
nm-auth-manager.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-auth-subject.c src: drop generated nm-src-enum-types.h 2016-10-22 17:16:17 +02:00
nm-auth-subject.h auth: embed private data NMAuthSubjectPrivate in NMAuthSubject struct 2016-05-12 10:24:36 +02:00
nm-auth-utils.c auth-utils: don't fail the auth chain if we can't get a single permissions 2016-11-11 17:41:43 +01:00
nm-auth-utils.h all: move NM_AUTH_PERMISSION_* defines to "nm-common-macros.h" header 2016-06-01 19:06:35 +02:00
nm-bus-manager.c core: introduce default logging macros 2016-10-14 15:57:43 +02:00
nm-bus-manager.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-checkpoint-manager.c build: don't add subdirectories to include search path but require qualified include 2016-11-21 14:26:37 +01:00
nm-checkpoint-manager.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-checkpoint.c core: refactor nm_settings_get_connections_sorted() to return array instead of GSList 2017-02-10 14:43:24 +01:00
nm-checkpoint.h checkpoint: introduce new flags to better restore previous state 2016-10-24 09:57:18 +02:00
nm-config-data.c build: fix -Wignored-qualifiers warnings 2017-02-06 19:27:21 +01:00
nm-config-data.h build: fix -Wignored-qualifiers warnings 2017-02-06 19:27:21 +01:00
nm-config.c all: cleanup switch fall-through comments for -Wimplicit-fallthrough warning 2017-02-06 16:45:20 +01:00
nm-config.h config: drop nm_config_get_debug() and access config directly 2016-11-25 18:02:38 +01:00
nm-connectivity.c core: introduce default logging macros 2016-10-14 15:57:43 +02:00
nm-connectivity.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-core-utils.c core: consolidate sorting of connections by autoconnect/timestamp 2017-02-10 14:43:24 +01:00
nm-core-utils.h core: consolidate sorting of connections by autoconnect/timestamp 2017-02-10 14:43:24 +01:00
nm-dcb.c build: don't add subdirectories to include search path but require qualified include 2016-11-21 14:26:37 +01:00
nm-dcb.h all: cleanup includes in header files 2016-08-17 19:51:17 +02:00
nm-default-route-manager.c build: don't add subdirectories to include search path but require qualified include 2016-11-21 14:26:37 +01:00
nm-default-route-manager.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-dhcp4-config.c exported-object: use NM_EXPORT_PATH_NUMBERED() macro 2017-01-03 15:40:17 +01:00
nm-dhcp4-config.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-dhcp6-config.c exported-object: use NM_EXPORT_PATH_NUMBERED() macro 2017-01-03 15:40:17 +01:00
nm-dhcp6-config.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-dispatcher.c build: don't add subdirectories to include search path but require qualified include 2016-11-21 14:26:37 +01:00
nm-dispatcher.h src: Fixes to add Proxy Feature 2016-10-04 11:44:44 +02:00
nm-exported-object.c all: use NM_CACHED_QUARK_FCN() instead of G_DEFINE_QUARK() 2017-02-10 14:33:52 +01:00
nm-exported-object.h exported-object: add "path" GObject property to have notify signal 2017-01-25 13:12:08 +01:00
nm-firewall-manager.c core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-firewall-manager.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-iface-helper.c iface-helper: don't cache nm_platform_check_support_kernel_extended_ifa_flags() flag 2017-01-10 14:29:46 +01:00
nm-ip4-config.c all: use nm_utils_strv_find_first() from shared/nm-utils 2017-02-04 17:55:30 +01:00
nm-ip4-config.h ip4-config: sort addresses only when reading the property value 2016-12-05 10:56:51 +01:00
nm-ip6-config.c all: use nm_utils_strv_find_first() from shared/nm-utils 2017-02-04 17:55:30 +01:00
nm-ip6-config.h ip6-config: add nm_ip6_config_set_privacy() 2016-12-05 10:56:51 +01:00
nm-logging.c logging: preserve errno in logging functions 2016-12-13 11:26:58 +01:00
nm-logging.h core: introduce default logging macros 2016-10-14 15:57:43 +02:00
nm-manager.c core: define a full sort order for nm_settings_connection_cmp_timestamp() 2017-02-10 14:43:24 +01:00
nm-manager.h core: refactor nm_manager_get_activatable_connections() to return an array 2017-02-10 14:43:24 +01:00
nm-multi-index.c all: modify line separator comments to be 80 chars wide 2016-10-03 12:01:15 +02:00
nm-multi-index.h all: cleanup includes in header files 2016-08-17 19:51:17 +02:00
nm-pacrunner-manager.c pacrunner: fix a few typos, uniforms spelling of various forms to "pacrunner" 2017-01-17 14:27:31 +01:00
nm-pacrunner-manager.h proxy: rename NMPacRunnerManager to NMPacrunnerManager 2016-10-04 12:14:15 +02:00
nm-policy.c core: consolidate sorting of connections by autoconnect/timestamp 2017-02-10 14:43:24 +01:00
nm-policy.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-proxy-config.c proxy: reorder parts in nm-proxy-config.c and nm-pacrunner-manager.c 2016-10-04 11:58:32 +02:00
nm-proxy-config.h proxy: remove unnecessary APIs 2016-10-04 11:44:44 +02:00
nm-rfkill-manager.c build: fix -Wignored-qualifiers warnings 2017-02-06 19:27:21 +01:00
nm-rfkill-manager.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-route-manager.c build: don't add subdirectories to include search path but require qualified include 2016-11-21 14:26:37 +01:00
nm-route-manager.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-session-monitor.c core: introduce default logging macros 2016-10-14 15:57:43 +02:00
nm-session-monitor.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-sleep-monitor.c core: introduce default logging macros 2016-10-14 15:57:43 +02:00
nm-sleep-monitor.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-test-utils-core.h shared: move shared files to subdirectory "shared/nm-utils/" 2016-06-16 10:45:53 +02:00
nm-types.h platform: add support for macsec links 2017-01-16 17:37:14 +01:00
org.freedesktop.NetworkManager.conf dns: use DBus to make dnsmasq nameserver changes 2016-04-21 15:32:07 +02:00