First of all, G_LOG_DOMAIN only matters when using g_log() directly.
Inside core, we always want to log via nm-logging. Every call to a
g_log() is a bug in the first place (like a failed assertion that logs
a g_critical() during g_return_if_fail()).
So, for all practic purposes, the logging domain is not used.
For nm-logging, the G_LOG_DOMAIN has no effect. Unless we find a proper
use of this domain, G_LOG_DOMAIN should not differ from what the rest of
core.
NMAccessPoint was in file "nm-wifi-ap.h" with
method nm_ap_*(). Make the naming consistent.
Also rename "nm-wifi-ap-utils.*" as it contains general
purpose wifi utilities. No need to have special "ap" utilities.
Same for "test-wifi-ap-utils.c". It just contains general wifi
tests.
For nm-iface-helper we want to use a different syslog-identifier then
"NetworkManager".
Since we build "nm-logging.c" as part of libNetworkManagerBase.la,
it would be cumbersome to compile the logging part multiple times
with different -DG_LOG_DOMAIN settings.
Instead, allow configuring at runtime.
The numeric value of NM_SETTING_PROXY_METHOD_NONE should be zero,
as that is the more natural default.
Also, cast all uses of the enum values in g_object_set() to
(int).
There isn't an easy way to determine the effective value of some
configuration options as their default value can be set at build time;
the user has to search in logs or look at the manual page when
available.
This adds those default values that can be changed at build time to
the output of 'NetworkManager --print-config':
[main]
# plugins=ifcfg-rh,ifupdown,ifnet,ibft
# rc-manager=symlink
# auth-polkit=true
dns=dnsmasq
...
[logging]
# backend=journal
...
Like all other keys that can have a default value, substitute the
default only when needed. In this way, we can tell later if the
value comes from configuration file or if it's the default value.
Also, rename CONFIG_PLUGINS_DEFAULT to NM_CONFIG_PLUGINS_DEFAULT.
The names NMPacRunnerManager, nm_pac_runner_manager were inconsistent
with NM_PACRUNNER_MANAGER and nm-pacrunner-manager.[hc]. They should
be consistent.
It seems pacrunner project calls itself "PACrunner" or just "pacrunner",
so prefer the spelling with lower-case 'r'.
libnm-core: pac-script property in NMSettingProxy now represents the
script itself not the location. It ensures that the connection is
self contained.
nmcli: Supports loading of PAC Script via file path or written explicitly.
Unnecessary APIs have been removed from nm-setting-proxy, client like
nm-connection-editor are expected to create a PAC script snippet the load
the location of file in NM.
The API of NMProxyConfig exposes @proxies and @excludes as strv values.
There is no need to track those values internally as a GPtrArray and
then clone them in the getters (especially, since the entire NMProxyConfig
API is internal to core.
Thereby, fix a few memory leaks in add_proxy_config() and some
style fixes for { }.
As the type is called NMPacRunnerManager, the proper name for the
functions is nm_pac_runner_manager*(). Alternatively, it the type
should be NMPacrunnerManager.
nm_pacrunner_manager_send() would only fail if passed in a NULL proxy_config.
And then it would log a <info> message without details about what failed.
Just don't do that.
src: Fixes in nm-device.c and nm-vpn-connection.c to update PacRunner
at the right place and moment. When a device goes up PacRunner is
configured with the Device IPxConfigs and Proxy Config. When it goes
down the same configuration is removed from PacRunner.
ifcfg-rh: Fixed to read and write proxy settings to the ifcfg network
scripts.
A new object NMPacRunnerManager has been added to manage and interact
PacRunner. It invokes both DBus methods on PacRunner DBus interface.
It stores the returned object path from CreateProxyConfiguration()
to feed as parameter to DestroyProxyCofiguration() when network goes down.