man/cli: add missing log domains to manual page and nmcli bash completion

Signed-off-by: Thomas Haller <thaller@redhat.com>
core: fix potential crash in nm-dhcp-client

Error found by coverity.

https://bugzilla.gnome.org/show_bug.cgi?id=728320

Signed-off-by: Thomas Haller <thaller@redhat.com>
core: fix leaks for nm_setting_ip[46]_config_add_\(route\|address\)()

Error found by coverity.

https://bugzilla.gnome.org/show_bug.cgi?id=728320

Signed-off-by: Thomas Haller <thaller@redhat.com>
ifcfg-rh: fix crash for reading invalid bridge configuration

Error found by coverity.

https://bugzilla.gnome.org/show_bug.cgi?id=728320

Signed-off-by: Thomas Haller <thaller@redhat.com>
ifcfg-rh: fix leak in svOpenFileInternal()

Error found by coverity.

https://bugzilla.gnome.org/show_bug.cgi?id=728320

Signed-off-by: Thomas Haller <thaller@redhat.com>
Merge branch 'th/bg728320_coverity'

Fix bugs (memory leaks and potential crashes), found using coverity.

https://bugzilla.gnome.org/show_bug.cgi?id=728320

Signed-off-by: Thomas Haller <thaller@redhat.com>
ifcfg-rh: fix alias tests to not depend on directory read order

test_read_wired_aliases_bad() would succeed or fail depending on the
order that ifcfg-aliasem1:1 and ifcfg-aliasem1:2 got read from disk.
Fix this by splitting it into two separate tests, each with only a
single alias.
tui: fix title of "Edit Connection" form (rh #1090397)

Form titles should be in titlecase; this was the only one that wasn't.
introspection: fix Device.Ip4Address type

https://bugzilla.gnome.org/show_bug.cgi?id=720963
platform: set link scope for IP4LL addresses

https://bugzilla.gnome.org/show_bug.cgi?id=728595

[thaller@redhat.com: minor change in coding style]
Signed-off-by: Thomas Haller <thaller@redhat.com>
examples: update 70-wifi-wired-exclusive.sh (bgo #513488)

Tighten up with suggestions from  Johannes Buchner and mention
his contribution.

Also fixes operation with current nmcli since it changed from
"802-3-ethernet" -> "ethernet" and thus the script was broken.

https://bugzilla.gnome.org/show_bug.cgi?id=513488
tui: fix route editing (rh #1090422)

NmtRouteTable's ip4-routes and ip6-routes properties have the
D-Bus-based route list types (like the corresponding NMSetting
properties) so we have to convert our GSList-of-NMIP[46]Route data
into those types when updating the property.

https://bugzilla.gnome.org/show_bug.cgi?id=728958
dns-manager: don't write "domain" to resolv.conf

resolv.conf(5) says:

    The domain and search keywords are mutually exclusive.  If more than
    one instance of these keywords is present, the last instance wins.

NM always writes out a "search" line if it writes a "domain" line, so
the "domain" line is always a no-op. So drop it.

https://bugzilla.gnome.org/show_bug.cgi?id=729137
dns-manager: fix the rules for public suffixes and search domains (rh #851521)

dfe194ee made it so that we don't use "public suffixes" as resolv.conf
search domains (eg, we don't add "search com" if the hostname is
"example.com"). However, if this results in us writing a resolv.conf
with no "search" line at all, then the resolver will fall back to
using the parent domain of the hostname as a search domain anyway,
thwarting us.

To fix that, use the domain itself as a search domain in this case,
since that's likely to be the expected behavior anyway. (And even if
it's not, there doesn't appear to be any way to block the resolver
from using the hostname's parent domain as a search domain unless we
specify at least one search domain ourselves.)

https://bugzilla.gnome.org/show_bug.cgi?id=729137
core: add parameter to ignore error in add/remove pending action

Add a parameter to nm_device_add_pending_action() to silently
accept adding duplicate actions.

Same for nm_device_remove_pending_action(), to silently ignore
removing non-pending actions.

Signed-off-by: Thomas Haller <thaller@redhat.com>
core: wait with "startup complete" for both IPv4 and IPv6 dynamic configuration

In case of DHCP4, DHCP6 and/or SLAAC, delay "startup complete" until
both IPv4 and IPv6 are ready. This especially has an effect on
nm-online/NetworkManager-wait-online.service, which blocks until
configuration of both IPv4 and IPv6 is ready.

We queue a pending_action when automatic configuration starts and
remove it again, when we receive an address. Before, "startup complete"
was reached when either one of the two IP protocols was configured.

https://bugzilla.redhat.com/show_bug.cgi?id=1086906

Signed-off-by: Thomas Haller <thaller@redhat.com>
core: merge branch 'th/rh1086906_start_complete_for_dynamic_ip'

https://bugzilla.redhat.com/show_bug.cgi?id=1086906

Signed-off-by: Thomas Haller <thaller@redhat.com>
core: add configuration main.debug and interpret environment variable NM_DEBUG

Interpret the configuration option main.debug and the
environment variable NM_DEBUG as a comma separated list
of debugging options (parsed with g_parse_debug_string()).

Currently only the option "RLIMIT_CORE" is supported, to set
the core dump size to unlimited.

Signed-off-by: Thomas Haller <thaller@redhat.com>
core: replace readlink() by glib equivalent in NMDeviceEthernet

Makes the function working for link destinations longer then 127 bytes and
fixes a potential bug that the result of readlink() was not zero
terminated for long paths.

Probably this would be no problem, but better be save.

Related: https://bugzilla.redhat.com/attachment.cgi?id=885371

Signed-off-by: Thomas Haller <thaller@redhat.com>
all: fix various warnings detected with coverity

https://bugzilla.gnome.org/show_bug.cgi?id=728320

Signed-off-by: Thomas Haller <thaller@redhat.com>