Thomas Haller
dfce87b2b7
dns: avoid truncation of searches list due to 256 char limit in glibc
...
Before glibc 2.26, glibc's resolver would only honor 6 search entries
and a character limit of 256. This was lifted recently ([1], [2], [3]).
We also lift this limitation in NetworkManager ([4], [5]).
However, older glibc versions would just truncate the string at 255
characters. In particular, it would not only tuncate the list to 6
entries, but the entry which crosses the 256th character boundary would
be mangled. Avoid that, by adding spaces.
[1] https://sourceware.org/ml/libc-alpha/2017-08/msg00010.html
[2] https://sourceware.org/bugzilla/show_bug.cgi?id=19569
[3] https://sourceware.org/bugzilla/show_bug.cgi?id=21475
[4] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/47
[5] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/80
(cherry picked from commit 49c11a44e4 )
2018-11-14 10:38:57 +01:00
Thomas Haller
b78a0ebcb1
dns/tests: add test for writing resolv.conf
...
(cherry picked from commit 60cd93612f )
2018-11-14 10:38:54 +01:00
Thomas Haller
4515d36fa1
dns: make strv arguments of create_resolv_conf() const
...
(cherry picked from commit 1c338861c4 )
2018-11-14 10:37:41 +01:00
Thomas Haller
5fe1728d1f
shared: add NM_MAKE_STRV() macro
...
(cherry picked from commit a15756d990 )
2018-11-14 10:36:15 +01:00
Thomas Haller
ce88f7c404
dns: fix creating resolv.conf content
...
g_string_new_len() allocates the buffer with length
bytes. Maybe it should be obvious (wasn't to me), but
if a init argument is given, that is taken as containing
length bytes.
So,
str = g_string_new_len (init, len);
is more like
str = g_string_new_len (NULL, len);
g_string_append_len (str, init, len);
and not (how I wrongly thought)
str = g_string_new_len (NULL, len);
g_string_append (str, init);
Fixes: 95b006c244
(cherry picked from commit 511709c54d )
2018-11-14 10:35:54 +01:00
Thomas Haller
23d9a5218a
dns: refactor create_resolv_conf() to use GString for constructing content
...
(cherry picked from commit 95b006c244 )
2018-11-14 10:35:40 +01:00
Corentin Noël
7d5cce2e10
libnm: fix GObject Introspection annotations for functions returning a GPtrArray
...
The GPtrArray owns the element so it is a (transfer full).
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/46
(cherry picked from commit 201c153e25 )
2018-11-12 13:04:09 +01:00
Lubomir Rintel
bc80722484
libnm-core: don't serialize synthetic properties in nm_setting_to_string()
...
Fixes: f957ea2b34
https://github.com/NetworkManager/NetworkManager/pull/245
(cherry picked from commit 395c385b9b )
2018-11-07 15:43:23 +01:00
Beniamino Galvani
468591805a
tests/cli: merge branch 'bg/issue39'
...
Wait for all wifi scans to finish before displaying the 'nmcli device
wifi list' result, and other fixes.
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/39
(cherry picked from commit 9958df36e5 )
2018-11-02 17:08:06 +01:00
Beniamino Galvani
9b0735f6fd
tests: simulate old LastScan wifi value in test-networkmanager-service.py
...
In this way clients will randomly find that the AP list is older than
30 seconds and they will issue a new scan.
(cherry picked from commit 5ba301f4eb )
2018-11-02 17:07:43 +01:00
Beniamino Galvani
d1afd1c420
cli/tests: fix output on failure
...
(cherry picked from commit 5665f67bae )
2018-11-02 17:07:41 +01:00
Beniamino Galvani
e22602096f
cli: fix memory leaks
...
(cherry picked from commit a985efaf93 )
2018-11-02 17:07:40 +01:00
Beniamino Galvani
c1bf574ea5
cli: wait for all wifi scans to finish before displaying the result
...
Otherwise devices are displayed in a inconsistent order.
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/39
(cherry picked from commit c0138cdb35 )
2018-11-02 17:07:39 +01:00
Thomas Haller
ba83251bba
systemd: merge branch 'CVE-2018-15688' into nm-1-14
2018-10-29 14:31:39 +01:00
Lennart Poettering
fc230dca13
dhcp6: make sure we have enough space for the DHCP6 option header
...
Fixes a vulnerability originally discovered by Felix Wilhelm from
Google.
CVE-2018-15688
LP: #1795921
https://bugzilla.redhat.com/show_bug.cgi?id=1639067
(cherry picked from commit 4dac5eaba4e419b29c97da38a8b1f82336c2c892)
(cherry picked from commit 01ca2053bb )
2018-10-28 18:46:10 +01:00
Li Song
cb77290a69
sd-dhcp: remove unreachable route after rebinding return NAK
...
(cherry picked from commit cc3981b1272b9ce37e7d734a7b2f42e84acac535)
(cherry picked from commit 915c2f675a )
2018-10-28 18:46:10 +01:00
Yu Watanabe
f11f5abb1a
sd-dhcp6: make dhcp6_option_parse_domainname() not store empty domain
...
This improves performance of fuzzer.
C.f. oss-fuzz#11019.
(cherry picked from commit 3c72b6ed4252e7ff5f7704bfe44557ec197b47fa)
(cherry picked from commit 50403cccee )
2018-10-28 18:46:10 +01:00
Yu Watanabe
0e93fd895d
sd-dhcp6: fix argument and error handling of dhcp6_option_parse_status()
...
(cherry picked from commit 91c43f3978fa7c8341550b9ca279e460ba7e74e6)
(cherry picked from commit 373cbfc8c6 )
2018-10-28 18:46:10 +01:00
Yu Watanabe
91fb1673d5
dhcp6: fix buffer size checking
...
(cherry picked from commit cb1bdeaf56852275e6b0dd1fba932bb174767f70)
2018-10-28 18:46:10 +01:00
Yu Watanabe
157094abd8
sd-dhcp-lease: fix memleaks
...
(cherry picked from commit e2975f854831d08a25b4f5eb329b6d04102e115f)
2018-10-28 18:37:27 +01:00
Thomas Haller
2c6fafad7a
libnm: fix crash in activate_info_complete() when cancelling
...
We must disconnect ActivateInfo before invoking callbacks.
Otherwise, it can happen that the callee cancels the cancellable,
which in turn enters activate_info_complete() again, and leads
to a crash.
https://bugzilla.redhat.com/show_bug.cgi?id=1642625
(cherry picked from commit ec37e18c64 )
2018-10-25 15:31:18 +02:00
Thomas Haller
0ec52f6dec
build: fix check-docs.sh for out-of-tree builds
...
Fixes: 7a59cd2744
(cherry picked from commit 168e8b9b6f )
2018-10-25 11:11:03 +02:00
Thomas Haller
a0157f8628
build: merge branch 'fix-bashism-in-tools-check-docs-sh'
...
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/35
(cherry picked from commit cacd3be1a9 )
2018-10-25 09:49:32 +02:00
Thomas Haller
679fa18e34
docs: rework check-docs test script
...
Try to make check-docs.sh script more readable.
Also, previously the script would check that one side was a subset
of the other side. Tighten this check up, now both sides of the
comparison must agree and yield the same lines.
(cherry picked from commit 7a59cd2744 )
2018-10-25 09:49:13 +02:00
Michael Biebl
ff7d3fd3d6
docs: fix bashism in tools/check-docs.sh
...
[thaller@redhat.com: fixed issue in original patch]
(cherry picked from commit e11ee4582a )
2018-10-25 09:49:12 +02:00
Beniamino Galvani
a9f907bfa7
build: merge branch 'bg/issue65'
...
ibft-related build fixes.
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/65
(cherry picked from commit 587e0e37b2 )
2018-10-24 22:14:09 +02:00
Beniamino Galvani
3d7b6ac8f9
build: fix ibft option in create-exports-NetworkManager.sh
...
(cherry picked from commit 1408ffd9f6 )
2018-10-24 22:13:30 +02:00
Thomas Haller
036d49b398
build: enable ibft plugin for make dist-check
...
(cherry picked from commit 0677b51549 )
2018-10-24 22:07:30 +02:00
Thomas Haller
dd76fe3ccd
build: fix build_clean.sh script to enable ibft
...
autotools build has/had a bug, where ibft test files would only be disted
if the ibft plugin was enabled.
Regardless of that, `build_clean.sh --release` is our suggested way to
create a release tarball. It should always enable the ibft plugin.
It didn't do so, due to a bug.
(cherry picked from commit b660a41c7c )
2018-10-24 22:07:29 +02:00
Beniamino Galvani
c56a3b6c11
build: unconditionally dist ibft test files
...
Even if ibft support is disabled, test files should be included in
distribution.
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/65
(cherry picked from commit bc6071aed6 )
2018-10-24 22:07:27 +02:00
Lubomir Rintel
5e8d7bfbd1
release: bump version to 1.14.5 (development)
2018-10-24 10:03:52 +02:00
Lubomir Rintel
66cad942f2
release: bump version to 1.14.4
2018-10-24 10:03:52 +02:00
Lubomir Rintel
8619214faa
release: update NEWS
2018-10-24 10:03:52 +02:00
Taegil Bae
4f2c6dd264
meson: set RPATH for libnm_device_plugin_wwan.so
...
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/26
(cherry picked from commit 4b2dc8826d )
2018-10-24 09:59:46 +02:00
Taegil Bae
4ebe6f1e26
meson: set RPATH for libnm_device_plugin_bluetooth.so
...
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/26
(cherry picked from commit 82b8ef2252 )
2018-10-24 09:59:44 +02:00
Michael Biebl
0ffb390bf3
settings/ifupdown: fix block_name typo in initialize()
...
In commit f0938948bc a typo creeped in and
"block->name" got replaced by "block_name". Variable block_name is used
for a different purpose and not initialized at this point.
As a result g_str_has_prefix crashes with a segfault.
Spotted by Bernhard Übelacker <bernhardu@mailbox.org>
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=911621
Fixes: f0938948bc
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/31
(cherry picked from commit 8179b23d76 )
2018-10-23 23:01:35 +02:00
Lubomir Rintel
576f0877f3
cli: initialize readline before installing the redisplay handler
...
Otherwise readline decides to initialize terminal handling at the first
readline call, and if that happens at the point it sees our
non-echoing rl_redisplay.
At that point, unless already intialized, readline wrongly convinces itself we
do our own handling of terminal peculiarities (such as cursor movement, or
erases). We do not -- we merely wrap the stock rl_redisplay(), temporarily
hiding the actual characters.
The rl_initialize() in nmc_readline_echo()s fixes broken line editing in
password prompts that weren't preceded a previous non-password prompt.
The other one is there for consistency only. (I guess we should be
initializing readline before use anyway; although it seems to initialize
itself anyway if we fail to do so...)
https://github.com/NetworkManager/NetworkManager/pull/241
(cherry picked from commit 05d6c993dd )
2018-10-23 23:01:30 +02:00
Beniamino Galvani
2e5d0f3046
initrd: cmdline-reader: fix setting uint properties
...
Previously a uint property was assigned with a guint64 value, which
has a different size. Fix this and add a warning when the read value
can't be converted.
Fixes: ecc074b2f8
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/66
(cherry picked from commit d0a99176a7 )
2018-10-23 13:24:42 +02:00
Beniamino Galvani
147081bd72
dhcp: dhclient: fix memory leak
...
Fixes: c263f5355c
(cherry picked from commit 0ba0f52cb7 )
2018-10-23 09:10:06 +02:00
Lubomir Rintel
506f781488
ndisc: mark a keep-alive variable unused
...
Fixed build with clang:
src/ndisc/nm-lndp-ndisc.c:494:27: error: unused variable 'ndisc_keep_alive' [-Werror,-Wunused-variable]
gs_unref_object NMNDisc *ndisc_keep_alive = g_object_ref (ndisc);
^
Fixes: 9aa628cedb
(cherry picked from commit 7c7e4cf134 )
2018-10-22 18:24:36 +02:00
Thomas Haller
aaf6d27ce5
test/meson: increase timeout for some tests
...
During gitlab-ci, some tests may take a long time. Increase
the default timeout.
(cherry picked from commit 43b28e06ed )
2018-10-22 16:20:59 +02:00
Beniamino Galvani
3fc592219e
device: fix crash in nm_device_generate_connection()
...
Fixes: 89d1c9fb30
https://bugzilla.redhat.com/show_bug.cgi?id=1631741
(cherry picked from commit f744e29dd3 )
2018-10-22 15:02:37 +02:00
Thomas Haller
ea4f8a0cad
checkpatch: support ranges for "checkpatch-feature-branch.sh"
...
Improve "checkpatch-feature-branch.sh" to support accepting
range as argument.
(cherry picked from commit 924a895a1a )
2018-10-22 14:13:34 +02:00
Thomas Haller
79a5417ffc
platform/tests: extend timeout for link-linux tests with meson
...
Our gitlab CI sometimes takes a long time with the
"/link/create-many-links/1000" test.
(cherry picked from commit 948abdb84d )
2018-10-22 13:57:53 +02:00
Thomas Haller
f41a69d416
checkpatch: fix "checkpatch-feature-branch.sh" for master branch
...
The main purpose of "checkpatch-feature-branch.sh" is to test all
patches of a feature branch. When we run the script against master
(or nm-1-*), then there is no feature branch.
Previously, the script would just error out.
That is not very useful, in particular as we call this from gitlab-ci,
which also runs on master.
Instead, in that case, test the HEAD.
(cherry picked from commit 4543785438 )
2018-10-22 13:57:52 +02:00
Thomas Haller
52542cbf6a
gitlab: merge branch 'th/gitlab-ci'
...
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/25
(cherry picked from commit 31f13acdc9 )
2018-10-22 13:26:14 +02:00
Thomas Haller
e29d62bcf5
gitlab: add .gitlab-ci.yml for gitlab CI
...
See-also: https://docs.gitlab.com/ee/ci/yaml/
(cherry picked from commit a0a0824564 )
2018-10-22 13:25:50 +02:00
Thomas Haller
91657c7761
checkpatch: add "contrib/scripts/checkpatch-feature-branch.sh" script
...
This takes current HEAD branch, and finds all the commits what
are not on master or one of the nm-1-* branches, and runs
checkpatch.pl on each.
The use is to run checkpatch.pl on all patches of a feature
branch.
(cherry picked from commit 369446eae6 )
2018-10-22 13:25:50 +02:00
Thomas Haller
7fc7a893ed
contrib: make "contrib/fedora/REQUIRED_PACKAGES" executable script
...
It will be called by .gitlab-ci.yml to install the packages.
(cherry picked from commit a487d34fc4 )
2018-10-22 13:25:50 +02:00
Jan Alexander Steffens (heftig)
aca7fd801a
meson: Fix platform tests
...
All platform tests were run twice with the `linux` platform, instead of
`fake` and `linux`, as expected.
(cherry picked from commit e0b168d6a8 )
2018-10-22 13:25:50 +02:00