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.
libnm-core has been expanded to include proxy settings which clients
like nmcli, nm-connection-editor use to configure proxy in PacRunner. It
offers three modes i.e 'auto', 'manual'and 'none' and accordingly take
data to configure PacRunner. The modes matches on the PacRunner side too.
The DHCP plugins are linked statically and don't have a plugin mechanism
to be loaded from a shared library. Change the _nm_dhcp_client_register()
mechanism to something more static.
Also, only link the plugins into the binary if they are actually
enabled. Previously, they would always be linked in (and always
register themself). However, nm_dhcp_dh*_get_path() would return NULL
which made the plugin unusable.
The autoconf code to detect the DHCP plugins is still not stellar, but
seems to work well enough for now. At least, we log the result of the
detection at the end of the configure-script, so a user can at least
notice what happend.
- use _NM_GET_PRIVATE() and _NM_GET_PRIVATE_PTR() everywhere.
- reorder statements, to have GObject related functions (init, dispose,
constructed) at the bottom of each file and in a consistent order w.r.t.
each other.
- unify whitespaces in signal and properties declarations.
- use NM_GOBJECT_PROPERTIES_DEFINE() and _notify()
- drop unused signal slots in class structures
- drop unused header files for device factories
- get_property() should be imidiately before set_property().
- type_init() should be before constructing(), constructed()
and type_new().
- dispose() and finalize() should be after object creation.
- at last follows class_init().
When looking for the dnsmasq (or any) binary, NetworkManager should
check /usr/local before it checks any system installed version. This
allows the user to replace the binary with a newer version should they
desire and is more consistent with the search behaviour commonly found
in $PATH.
https://github.com/NetworkManager/NetworkManager/pull/10
Our internal copy of systemd should not be in the search path.
Instead, let users only
#include "systemd/nm-sd.h"
which then includes everything from systemd that we need.
We want to avoid to accidentally include anything from our
systemd-copy. Any user of that should only include "nm-sd.h",
which then includes everything that is needed further.
For example, "src/devices/wwan/nm-modem-manager.c" has
#include <systemd/nm-daemon.h>
which in turn includes
#include "_sd-common.h"
This works all correctly before, because #include "" will first
look in the directory where sd-daemon.h is. However, our mixing of
external systemd library and internal copy is rather dangerous.
Try to avoid it further by keeping the include paths clean.
The team-config must be valid utf-8. First of all, JSON
is also defined for other unicode encodings, but libjansson
can only handle utf-8. So, just require that.
A file with a '\0' truncates part of the file and is thus
invalid.
nmcli has a heuristic when setting the team-config to accepting both
a filename or the plain json text.
Add support for two schemes "file://" and "json://" to explicitly
determine whether to read from file or from json.
Also, no longer silently ignore an all-whitespace word. That is an
error (unless you have a file named " ").
Also, no longer replace newlines with space. Don't mangle the input
text at all.
Since we possibly already link against libjansson, we can also expose some
helper utils which allows nmcli to do basic validation of JSON without
requiring to duplicate the effort of using libjansson.
Also, tighten up the cecks to ensure that we have a JSON object at hand.
We are really interested in that and not of arrays or literals.
NMPolicy:auto_activate_device() would wrongly not free the
specific_object, although it is documented as transfer-full.
The only implementation of can_auto_connect() that returned
a specific-object is NMDeviceWifi:can_auto_connect(). So, there
wasn't any actual bug or memory leak.
Fixes: 4c028c7cef
First, consider all devices and not only realized and managed ones
when an empty list is passed. Also, move the list evaluation to the
checkpoint manager, since the check for device conflicts is done
there.
Fixes: 3e09aed2a0
In order to better restore the previous system state, allow the
inclusion of unmanaged devices in a checkpoint and try to revert to
the old state taking also the realized/managed state into account.