On D-Bus level, string (s) or object paths (o) cannot be NULL.
Thus, whenver server exposes such an object, it gets automatically
coerced to "" or "/", respectively.
On client side, libnm should coerce certain properties back, for which
"" is just not a sensible value.
For example, an empty NM_DEVICE_ETHERNET_HW_ADDRESS should be instead
exposed as NULL.
Technically, this is an API change. However, all users were well advised
to expect both NULL and "" as possible return values and handle them
accordingly.
It was a macro to pass on the non-const-ness of the argument, but
that just doesn't make sense.
That is a signature
char *nm_str_not_empty (char *)
does not make sense, because you cannot transfer ownership
conditionally without additional checks to avoid a leak. Which makes
this form is pointless. For example:
char *
foo (void)
{
char *s;
s = _create_value ();
return nm_str_not_empty (s); /* leaks "" */
}
When a global checkpoint is created (one with empty device list) we
save the status of all devices to restore it later. After the
checkpoint new interfaces and connections may appear and they can
significantly influence the overall networking status, but we don't
consider them at the moment.
Introduce a new flag DELETE_NEW_CONNECTIONS to delete any connection
added after the checkpoint and similarly a DISCONNECT_NEW_DEVICES to
ensure that the connection active on newly appeared devices doesn't
disrupt network connectivity.
https://bugzilla.redhat.com/show_bug.cgi?id=1378393
The user can configure the configuration paths via command line
arguments. If the user configures /var/run/NetworkManager/conf.d
as --system-config-dir or --config-dir, avoid using it as run-config
directory.
Yes, this doesn't catch
NetworkManager --config-dir=/etc/NetworkManager/conf.d \
--system-config-dir=/etc/NetworkManager/conf.d/
This is useful for configuration that gets auto-generated from another source.
These are then not primary configuration files and thus should not be put into
/etc.
This mirrors the structure of udev rules or systemd units, which can also be in
/usr, /run/, or /etc/.
Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
https://bugzilla.gnome.org/show_bug.cgi?id=773069
Some cleanup of the toplevel Makefile.am.
The aim it to build every source file only once. That saves compilation
time, but more importantly it guarantees that there are no differing CFLAGS
and all users use exactly the same binary.
NetworkManager and nm-iface-helper compiled nm-dhcp-manager.c twice,
the latter with setting -DNM_DHCP_INTERNAL_ONLY to only enable the
internal plugin.
Change that to compile nm-dhcp-manager.c once for both users
by putting it into libNetworkManagerBase.
We only needed proper glib enum types for having properties
and signal arguments. These got all converted to plain int,
so no longer generate such an enum type.
Depending on how arguments are passed to the called function,
this could lead to a crash.
Maybe not on 32 bit machines where the size of the pointer is
the size of an int.
Maybe not on x86_64, where the arguments are passed in registers.
Fixes: b88c309167
There is an strange automake warning
Makefile.vapigen:49: warning: $(1) was already defined in condition TRUE, which includes condition ENABLE_VAPIGEN ...
Makefile.am:4: 'Makefile.vapigen' included from here
Makefile.glib:124: ... '$(1)' previously defined here
Makefile.am:1: 'Makefile.glib' included from here
when having
if ENABLE_VAPIGEN
include Makefile.vapigen
endif
That is worked around by removing the "if", which however
requires us to remove the error check in Makefile.vapigen.