2020-12-23 22:21:36 +01:00
|
|
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
2020-01-14 10:42:24 +01:00
|
|
|
|
2017-11-25 11:39:06 +01:00
|
|
|
configure_file(
|
2019-08-28 10:40:46 +02:00
|
|
|
input: 'server.conf.in',
|
|
|
|
|
output: '@BASENAME@',
|
2017-11-25 11:39:06 +01:00
|
|
|
install_dir: join_paths(nm_datadir, 'doc', nm_name, 'examples'),
|
2018-10-18 12:50:20 +02:00
|
|
|
configuration: data_conf,
|
2017-11-25 11:39:06 +01:00
|
|
|
)
|
|
|
|
|
|
2019-08-29 08:09:09 +02:00
|
|
|
if install_systemdunitdir
|
2017-11-25 11:39:06 +01:00
|
|
|
services = [
|
2019-08-28 10:40:46 +02:00
|
|
|
'NetworkManager-dispatcher.service.in',
|
|
|
|
|
'NetworkManager.service.in',
|
sudo: introduce nm-sudo D-Bus service
NetworkManager runs as root and has lots of capabilities.
We want to reduce the attach surface by dropping capabilities,
but there is a genuine need to do certain things.
For example, we currently require dac_override capability, to open
the unix socket of ovsdb. Most users wouldn't use OVS, so we should
find a way to not require that dac_override capability. The solution
is to have a separate, D-Bus activate service (nm-sudo), which
has the capability to open and provide the file descriptor.
For authentication, we only rely on D-Bus. We watch the name owner
of NetworkManager, and only accept requests from that service. We trust
D-Bus to get it right a request from that name owner is really coming
from NetworkManager. If we couldn't trust that, how could PolicyKit
or any authentication via D-Bus work? For testing, the user can set
NM_SUDO_NO_AUTH_FOR_TESTING=1.
https://bugzilla.redhat.com/show_bug.cgi?id=1921826
2021-07-18 08:53:43 +02:00
|
|
|
'nm-sudo.service.in',
|
2017-11-25 11:39:06 +01:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
if have_systemd_200
|
2019-08-28 10:40:46 +02:00
|
|
|
services += ['NetworkManager-wait-online.service.in']
|
2017-11-25 11:39:06 +01:00
|
|
|
else
|
2019-08-28 10:40:46 +02:00
|
|
|
services += ['NetworkManager-wait-online-systemd-pre200.service.in']
|
2017-11-25 11:39:06 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
foreach service: services
|
|
|
|
|
configure_file(
|
2019-08-28 10:40:46 +02:00
|
|
|
input: service,
|
|
|
|
|
output: '@BASENAME@',
|
2019-08-29 08:09:09 +02:00
|
|
|
install_dir: systemd_systemdsystemunitdir,
|
2018-10-18 12:50:20 +02:00
|
|
|
configuration: data_conf,
|
2017-11-25 11:39:06 +01:00
|
|
|
)
|
|
|
|
|
endforeach
|
|
|
|
|
|
|
|
|
|
if enable_ovs
|
|
|
|
|
install_data(
|
|
|
|
|
'NetworkManager-ovs.conf',
|
2019-08-29 08:09:09 +02:00
|
|
|
install_dir: join_paths(systemd_systemdsystemunitdir, 'NetworkManager.service.d'),
|
2017-11-25 11:39:06 +01:00
|
|
|
)
|
|
|
|
|
endif
|
|
|
|
|
endif
|
|
|
|
|
|
2019-08-29 08:09:09 +02:00
|
|
|
if install_udevdir
|
2017-11-25 11:39:06 +01:00
|
|
|
data = files(
|
|
|
|
|
'84-nm-drivers.rules',
|
2018-04-19 14:05:52 +02:00
|
|
|
'85-nm-unmanaged.rules',
|
2018-10-18 12:50:20 +02:00
|
|
|
'90-nm-thunderbolt.rules',
|
2017-11-25 11:39:06 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
install_data(
|
|
|
|
|
data,
|
2019-08-29 08:09:09 +02:00
|
|
|
install_dir: join_paths(udev_udevdir, 'rules.d'),
|
2017-11-25 11:39:06 +01:00
|
|
|
)
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
if enable_polkit
|
|
|
|
|
policy = 'org.freedesktop.NetworkManager.policy'
|
|
|
|
|
|
|
|
|
|
policy_in = configure_file(
|
|
|
|
|
input: policy + '.in.in',
|
2019-08-28 10:40:46 +02:00
|
|
|
output: '@BASENAME@',
|
2018-10-18 12:50:20 +02:00
|
|
|
configuration: data_conf,
|
2017-11-25 11:39:06 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
custom_target(
|
|
|
|
|
policy,
|
|
|
|
|
input: policy_in,
|
2019-08-28 10:40:46 +02:00
|
|
|
output: '@BASENAME@',
|
2017-11-25 11:39:06 +01:00
|
|
|
command: intltool_xml_cmd,
|
|
|
|
|
install: true,
|
2019-08-29 08:09:09 +02:00
|
|
|
install_dir: polkit_gobject_policydir,
|
2017-11-25 11:39:06 +01:00
|
|
|
)
|
|
|
|
|
endif
|
2020-05-08 09:09:25 +02:00
|
|
|
|
|
|
|
|
if enable_firewalld_zone
|
|
|
|
|
install_data(
|
|
|
|
|
'nm-shared.xml',
|
|
|
|
|
install_dir: join_paths(nm_prefix, 'lib', 'firewalld', 'zones')
|
|
|
|
|
)
|
|
|
|
|
endif
|