]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
4 years agonetwork: introduce route_full_hash_ops
Yu Watanabe [Tue, 16 Jul 2019 16:47:52 +0000 (01:47 +0900)] 
network: introduce route_full_hash_ops

Will be used later.

4 years agoMerge pull request #13097 from poettering/mount-state-fix
Zbigniew Jędrzejewski-Szmek [Thu, 18 Jul 2019 15:33:20 +0000 (17:33 +0200)] 
Merge pull request #13097 from poettering/mount-state-fix

Scan /proc/self/mountinfo before waitid() handling

4 years agoMerge pull request #13102 from mbiebl/nologin-path
Zbigniew Jędrzejewski-Szmek [Thu, 18 Jul 2019 15:17:23 +0000 (17:17 +0200)] 
Merge pull request #13102 from mbiebl/nologin-path

meson: make nologin path build time configurable

4 years agomount: rename update_parameters_proc_self_mount_info() → update_parameters_proc_self_... 13097/head
Lennart Poettering [Thu, 18 Jul 2019 15:02:30 +0000 (17:02 +0200)] 
mount: rename update_parameters_proc_self_mount_info() → update_parameters_proc_self_mountinfo()

let's name the call like the file in /proc is actually called.

4 years agoswap: scan /proc/swaps before processing waitid() results
Lennart Poettering [Wed, 17 Jul 2019 16:58:44 +0000 (18:58 +0200)] 
swap: scan /proc/swaps before processing waitid() results

Similar to the previous commit, but for /proc/swaps, where the same
logic and rationale applies.

4 years agomount: rescan /proc/self/mountinfo before processing waitid() results
Lennart Poettering [Wed, 17 Jul 2019 16:57:13 +0000 (18:57 +0200)] 
mount: rescan /proc/self/mountinfo before processing waitid() results

(The interesting bits about the what and why are in a comment in the
patch, please have a look there instead of looking here in the commit
msg).

Fixes: #10872
4 years agomount: simplify /proc/self/mountinfo handler
Lennart Poettering [Wed, 17 Jul 2019 12:53:07 +0000 (14:53 +0200)] 
mount: simplify /proc/self/mountinfo handler

Our IO handler is only installed for one fd, hence there's no reason to
conditionalize on it again.

Also, split out the draining into a helper function of its own.

4 years agoMerge pull request #12639 from michaelolbrich/job-order
Lennart Poettering [Thu, 18 Jul 2019 14:53:32 +0000 (16:53 +0200)] 
Merge pull request #12639 from michaelolbrich/job-order

make the run queue order deterministic

4 years agoman: add note about systemctl stop return value
Zbigniew Jędrzejewski-Szmek [Thu, 18 Jul 2019 08:14:52 +0000 (10:14 +0200)] 
man: add note about systemctl stop return value

Fixes #13104.

(I know a lot more could be added to that  man page. This patch only addresses that
once specific complaint.)

4 years agoMerge pull request #13107 from keszybz/lvalue-rvalue
Lennart Poettering [Thu, 18 Jul 2019 14:12:20 +0000 (16:12 +0200)] 
Merge pull request #13107 from keszybz/lvalue-rvalue

Better error messages for syntax errors

4 years agotest: replace Makefile copy with a symlink for TEST-28-PERCENTJ-WANTEDBY 13102/head
Michael Biebl [Thu, 18 Jul 2019 10:48:50 +0000 (12:48 +0200)] 
test: replace Makefile copy with a symlink for TEST-28-PERCENTJ-WANTEDBY

TEST-28-PERCENTJ-WANTEDBY/Makefile is identical to
TEST-01-BASIC/Makefile so avoid duplication and use a symlink instead.

4 years agomeson: make nologin path build time configurable
Michael Biebl [Wed, 17 Jul 2019 23:24:00 +0000 (01:24 +0200)] 
meson: make nologin path build time configurable

Some distros install nologin as /usr/sbin/nologin, others as
/sbin/nologin.
Since we can't really on merged-usr everywhere (where the path wouldn't
matter), make the path build time configurable via -Dnologin-path=.

Closes #13028

4 years agoshared/conf-parser: say "key name" not "lvalue", add dot 13107/head
Zbigniew Jędrzejewski-Szmek [Thu, 18 Jul 2019 09:33:48 +0000 (11:33 +0200)] 
shared/conf-parser: say "key name" not "lvalue", add dot

"lvalue" is our internal jargon. Let's try not to confuse non-programmers.

4 years agoshared/conf-parser: emit a nicer warning for something like "======"
Zbigniew Jędrzejewski-Szmek [Thu, 18 Jul 2019 09:30:43 +0000 (11:30 +0200)] 
shared/conf-parser: emit a nicer warning for something like "======"

Urlich Windl wrote on the mailing list:
> I noticed that a line of "=======" in "[Service]" cases the message " Unknown lvalue '' in section 'Service'".

This now becomes:
/etc/systemd/system/eqeqeqeq.service:3: Missing key name before '=', ignoring line.

4 years agoshared/conf-parser: be nice and ignore lines without "="
Zbigniew Jędrzejewski-Szmek [Thu, 18 Jul 2019 09:28:55 +0000 (11:28 +0200)] 
shared/conf-parser: be nice and ignore lines without "="

We generally don't treat syntax error as fatal, but in this case we would
completely refuse to load the file. I think we should treat the the same
as assignment outside of a section, or an unknown key name.

4 years agojob: make the run queue order deterministic 12639/head
Michael Olbrich [Wed, 22 May 2019 10:12:17 +0000 (12:12 +0200)] 
job: make the run queue order deterministic

Jobs are added to the run queue in random order. This happens because most
jobs are added by iterating over the transaction or dependency hash maps.

As a result, jobs that can be executed at the same time are started in a
different order each time.
On small embedded devices this can cause a measurable jitter for the point
in time when a job starts (~100ms jitter for 10 units that are started in
random order).
This results is a similar jitter for the boot time. This is undesirable in
general and make optimizing the boot time a lot harder.
Also, jobs that should have a higher priority because the unit has a higher
CPU weight might get executed later than others.

Fix this by turning the job run_queue into a Prioq and sort by the
following criteria (use the next if the values are equal):
- CPU weight
- nice level
- unit type
- unit name

The last one is just there for deterministic sorting to avoid any jitter.

4 years agobasic: reorder UnitType enum
Michael Olbrich [Wed, 3 Jul 2019 14:11:47 +0000 (16:11 +0200)] 
basic: reorder UnitType enum

The enum order will be used to order jobs in the job queue.
Make sure that unit types that fork aditional processes come first to
maximize parallelism.

4 years agoMerge pull request #13103 from anitazha/conditiondocs
Zbigniew Jędrzejewski-Szmek [Thu, 18 Jul 2019 06:06:37 +0000 (08:06 +0200)] 
Merge pull request #13103 from anitazha/conditiondocs

NEWS and catalog update for ExecCondition=

4 years agocatalog: reference ExecCondition= in unit skipped str 13103/head
Anita Zhang [Thu, 18 Jul 2019 05:39:55 +0000 (22:39 -0700)] 
catalog: reference ExecCondition= in unit skipped str

4 years agoNEWS: bullet point for ExecCondition=
Anita Zhang [Thu, 18 Jul 2019 05:24:23 +0000 (22:24 -0700)] 
NEWS: bullet point for ExecCondition=

4 years agocore: never propagate reload failure to service result
Lennart Poettering [Wed, 17 Jul 2019 17:16:33 +0000 (19:16 +0200)] 
core: never propagate reload failure to service result

Fixes: #11238
4 years agoMerge pull request #13047 from niedbalski/fix-5552-pr
Lennart Poettering [Wed, 17 Jul 2019 17:27:16 +0000 (19:27 +0200)] 
Merge pull request #13047 from niedbalski/fix-5552-pr

resolved: add new option to only cache positive answers

4 years agoMerge pull request #13086 from yuwata/network-dhcp6-cleanups
Lennart Poettering [Wed, 17 Jul 2019 17:26:46 +0000 (19:26 +0200)] 
Merge pull request #13086 from yuwata/network-dhcp6-cleanups

network: dhcp6 cleanups

4 years agoMerge pull request #13093 from keszybz/two-assert-cc-cleanups
Frantisek Sumsal [Wed, 17 Jul 2019 15:53:35 +0000 (15:53 +0000)] 
Merge pull request #13093 from keszybz/two-assert-cc-cleanups

Two assert_cc cleanups

4 years agoresolved: switch cache option to a tri-state option (systemd#5552). 13047/head
Jorge Niedbalski [Fri, 12 Jul 2019 19:34:24 +0000 (15:34 -0400)] 
resolved: switch cache option to a tri-state option (systemd#5552).

Change the resolved.conf Cache option to a tri-state "no, no-negative, yes" values.

If a lookup returns SERVFAIL systemd-resolved will cache the result for 30s (See 201d995),
however, there are several use cases on which this condition is not acceptable (See systemd#5552 comments)
and the only workaround would be to disable cache entirely or flush it , which isn't optimal.

This change adds the 'no-negative' option when set it avoids putting in cache
negative answers but still works the same heuristics for positive answers.

Signed-off-by: Jorge Niedbalski <jnr@metaklass.org>
4 years agonetwork: update state file after dhcp6 events 13086/head
Yu Watanabe [Wed, 17 Jul 2019 14:12:07 +0000 (23:12 +0900)] 
network: update state file after dhcp6 events

E.g. DNS servers may be received from DHCPv6 server. If the link is
already in configured state, the DNS servers are not written in the
state file.

4 years agoRevert "test-network: extend sleep time"
Yu Watanabe [Wed, 17 Jul 2019 14:03:01 +0000 (23:03 +0900)] 
Revert "test-network: extend sleep time"

This reverts commit 7d7bb5c8613b774bf77c531f46d31ee20d7a1b1e.

Still the CIs are flaky and the commit just slow down them.

4 years agoman: fix wrong section name
Yu Watanabe [Wed, 17 Jul 2019 01:07:42 +0000 (10:07 +0900)] 
man: fix wrong section name

4 years agonetwork: fix use after free()
Yu Watanabe [Wed, 17 Jul 2019 01:21:07 +0000 (10:21 +0900)] 
network: fix use after free()

The hashmap will be accessed by client_stop().

4 years agonetwork: drop unnecessary line breaks
Yu Watanabe [Wed, 17 Jul 2019 00:46:36 +0000 (09:46 +0900)] 
network: drop unnecessary line breaks

4 years agonetwork: drop fallback mechanism to assign DHCPv6 addresses with IFA_F_NOPREFIXROUTE
Yu Watanabe [Wed, 17 Jul 2019 00:40:06 +0000 (09:40 +0900)] 
network: drop fallback mechanism to assign DHCPv6 addresses with IFA_F_NOPREFIXROUTE

The flag IFA_F_NOPREFIXROUTE was introduced in kernel-3.14. But even if
the kernel does not support the flag, it should be just ignored. So, it
is not necessary to do the fallback logic. Moreover, the current logic
is not a fallback mechanism but just retrying. So, it should not work.
Let's drop that.

4 years agoMerge pull request #13080 from keszybz/firstboot-fixes
Lennart Poettering [Wed, 17 Jul 2019 12:43:15 +0000 (14:43 +0200)] 
Merge pull request #13080 from keszybz/firstboot-fixes

Firstboot fixes

4 years agotest/TEST-16: don't copy systemd-notify or lib from $BUILD_DIR
Dan Streetman [Sun, 14 Jul 2019 04:24:28 +0000 (00:24 -0400)] 
test/TEST-16: don't copy systemd-notify or lib from $BUILD_DIR

On Ubuntu CI, these don't exist because it tests installed
binaries, not just-built binaries.

4 years agoRewrite IN_SET() 13093/head
Zbigniew Jędrzejewski-Szmek [Thu, 11 Jul 2019 08:17:28 +0000 (10:17 +0200)] 
Rewrite IN_SET()

This restores proper speed with asan builds with gcc 9.1.1.
Fixes #12997.

$ rpm -q gcc
gcc-9.1.1-2.fc31.x86_64

$ time ASAN_OPTIONS=strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1 UBSAN_OPTIONS=print_stacktrace=1:print_summary=1:halt_on_error=1 build-rawhide-sanitize/test-conf-parser

(old) 86.99s user 20.22s system 361% cpu 29.635 total
(new)  3.05s user  0.29s system  99% cpu  3.377 total

Size is increased a bit:

$ size build/systemd
(old) 1683421  246100    1208 1930729  1d75e9 build/systemd
(new) 1688237  246100    1208 1935545  1d88b9 build/systemd

... but that's <0.1%, so we don't really care.

4 years agoMerge pull request #13092 from keszybz/coverity-fixes
Lennart Poettering [Wed, 17 Jul 2019 12:18:49 +0000 (14:18 +0200)] 
Merge pull request #13092 from keszybz/coverity-fixes

Coverity fixes

4 years agoMerge pull request #13091 from poettering/nspawn-copy
Lennart Poettering [Wed, 17 Jul 2019 12:10:06 +0000 (14:10 +0200)] 
Merge pull request #13091 from poettering/nspawn-copy

nspawn: allow nspawn's copy operation to be abortable via C-c

4 years agoDrop trailing slash from assert_cc() definition
Zbigniew Jędrzejewski-Szmek [Wed, 17 Jul 2019 10:45:42 +0000 (12:45 +0200)] 
Drop trailing slash from assert_cc() definition

We use assert_cc(...); almost everywhere. Let's always require that.

https://github.com/systemd/systemd/issues/12997#issuecomment-510103988

4 years agobasic/macro: drop do {} while(0) from assert_not_reached
Zbigniew Jędrzejewski-Szmek [Wed, 17 Jul 2019 10:27:33 +0000 (12:27 +0200)] 
basic/macro: drop do {} while(0) from assert_not_reached

log_assert_failed_unreachable is just a normal function call, no need to wrap
it.

https://github.com/systemd/systemd/issues/12997#issuecomment-510103988

4 years agoMerge pull request #12675 from yuwata/network-set-dns
Lennart Poettering [Wed, 17 Jul 2019 10:07:39 +0000 (12:07 +0200)] 
Merge pull request #12675 from yuwata/network-set-dns

resolvectl: support to modify interfaces managed by networkd

4 years agofirstboot: actually accept empty input to mean skip 13080/head
Zbigniew Jędrzejewski-Szmek [Tue, 16 Jul 2019 16:48:15 +0000 (18:48 +0200)] 
firstboot: actually accept empty input to mean skip

We'd loop if the input was empty. We need to return to the caller.

4 years agofirstboot: fix hang waiting for second Enter on input
Zbigniew Jędrzejewski-Szmek [Tue, 16 Jul 2019 16:35:34 +0000 (18:35 +0200)] 
firstboot: fix hang waiting for second Enter on input

The comment explains the reason: we'd wait for the second \n
and then ungetc() it. Then the buffered \n would cause a problem
when the next prompt was issued, so in effect it wasn't possible
to answer the second question.

4 years agofirstboot: only list all options on demand
Zbigniew Jędrzejewski-Szmek [Tue, 16 Jul 2019 15:17:29 +0000 (17:17 +0200)] 
firstboot: only list all options on demand

The user most likely knows the name of their locale/keymap/whatever,
and paging through multiple pages of output has little benefit.

The header that was printed before is now not printed anymore. But
now it's obvious from the context what we are printing, so we don't
need to print the header.

4 years agofirstboot: use free_and_strdup, free_and_replace
Zbigniew Jędrzejewski-Szmek [Tue, 16 Jul 2019 15:16:42 +0000 (17:16 +0200)] 
firstboot: use free_and_strdup, free_and_replace

4 years agomount-util: bind_remount: avoid calling statvfs
Jakob Unterwurzacher [Tue, 16 Jul 2019 21:09:07 +0000 (23:09 +0200)] 
mount-util: bind_remount: avoid calling statvfs

The commit
"util: Do not clear parent mount flags when setting up namespaces"
introduced a statvfs call read the flags of the original mount
and have them applied to the bind mount.

This has two problems:

(1) The mount flags returned by statvfs(2) do not match the flags
accepted by mount(2). For example, the value 4096 means ST_RELATIME
when returned by statvfs(2), but means MS_BIND when passed to mount(2).

(2) A call to statvfs blocks indefinitely when ran against a disconnected
network drive ( https://github.com/systemd/systemd/issues/12667 ).

We already use libmount to parse `/proc/self/mountinfo` but did not use the
mount flag information from there. This patch changes that to use the mount
flags parsed by libmount instead of calling statvfs. Only if getting the
flags through libmount fails we call statvfs.

Fixes https://github.com/systemd/systemd/issues/12667

4 years agosd-device: voidify and simplify calls to ordered_hashmap_iterate() 13092/head
Zbigniew Jędrzejewski-Szmek [Wed, 17 Jul 2019 09:30:04 +0000 (11:30 +0200)] 
sd-device: voidify and simplify calls to ordered_hashmap_iterate()

Coverity CID#1402356 and CID#1402335.

4 years agosd-bus: voidify two calls to hashmap_iterate()
Zbigniew Jędrzejewski-Szmek [Wed, 17 Jul 2019 09:20:36 +0000 (11:20 +0200)] 
sd-bus: voidify two calls to hashmap_iterate()

Coverity CID#1402304 and CID#1402307.

4 years agotest-networkd-conf: add missing assert
Zbigniew Jędrzejewski-Szmek [Wed, 17 Jul 2019 09:16:53 +0000 (11:16 +0200)] 
test-networkd-conf: add missing assert

The test would not pass before, because EXTRACT_UNQUOTE|EXTRACT_RETAIN_ESCAPE
didn't work (we'd get "KEY3=val with \\quotation\\" as the last string. Now we
are only doing EXTRACT_UNQUOTE, so we get the expected "KEY3=val with \"quotation\"".

Coverity CID#1402781.

4 years agoshared/conf-parser,networkd: EXTRACT_UNQUOTE|EXTRACT_RETAIN_ESCAPE → EXTRACT_UNQUOTE
Zbigniew Jędrzejewski-Szmek [Wed, 17 Jul 2019 09:13:20 +0000 (11:13 +0200)] 
shared/conf-parser,networkd: EXTRACT_UNQUOTE|EXTRACT_RETAIN_ESCAPE → EXTRACT_UNQUOTE

It's hard to even say what exactly this combination means. Escaping is
necessary when quoting to have quotes within the string. So the escaping of
quote characters is inherently tied to quoting. When unquoting, it seems
natural to remove escaping which was done for the quoting purposes. But with
both flags we would be expected to re-add this escaping after unqouting? Or
maybe keep the escaping which is not necessary for quoting but otherwise
present? This all seems too complicated, let's just forbid such usage and
always fully unescape when unquoting.

4 years agonspawn: fix misplaced parenthesis and merge two error handling paths
Zbigniew Jędrzejewski-Szmek [Wed, 17 Jul 2019 08:14:34 +0000 (10:14 +0200)] 
nspawn: fix misplaced parenthesis and merge two error handling paths

I don't think we need to provide the two separate error messages,
let's shorten the code a bit by merging them.

Coverity CID#1402320.

4 years agonspawn: fix memleak in argument parsing
Zbigniew Jędrzejewski-Szmek [Wed, 17 Jul 2019 08:09:18 +0000 (10:09 +0200)] 
nspawn: fix memleak in argument parsing

Coverity CID#1402297.

4 years agocoredumpctl: check return value
Zbigniew Jędrzejewski-Szmek [Wed, 17 Jul 2019 08:02:13 +0000 (10:02 +0200)] 
coredumpctl: check return value

retrieve() allocates memory, so it may fail.
Coverity CID#1402338.

4 years agocoredumpctl: use free_and_replace in one more place
Zbigniew Jędrzejewski-Szmek [Wed, 17 Jul 2019 08:01:24 +0000 (10:01 +0200)] 
coredumpctl: use free_and_replace in one more place

4 years agoshared: voidify call to loop_write() and trim duplicate code
Zbigniew Jędrzejewski-Szmek [Wed, 17 Jul 2019 07:49:01 +0000 (09:49 +0200)] 
shared: voidify call to loop_write() and trim duplicate code

Coverity CID#1402375.

4 years agoshared: fix assert call
Zbigniew Jędrzejewski-Szmek [Wed, 17 Jul 2019 07:39:39 +0000 (09:39 +0200)] 
shared: fix assert call

Fixup for 3572d3df8f8. Coverity CID#1403013.

4 years agocore: ExecCondition= for services
Anita Zhang [Sat, 29 Jun 2019 00:02:30 +0000 (17:02 -0700)] 
core: ExecCondition= for services

Closes #10596

4 years agonspawn: make use of SIGINT handling when copying files 13091/head
Lennart Poettering [Wed, 17 Jul 2019 08:59:29 +0000 (10:59 +0200)] 
nspawn: make use of SIGINT handling when copying files

Fixes: #13079
4 years agobtrfs-util: expose SIGINT behaviour in snapshot copy fallback, too
Lennart Poettering [Wed, 17 Jul 2019 08:58:49 +0000 (10:58 +0200)] 
btrfs-util: expose SIGINT behaviour in snapshot copy fallback, too

4 years agocopy: optionally check for SIGINT regularly, and abort operation safely
Lennart Poettering [Wed, 17 Jul 2019 08:58:22 +0000 (10:58 +0200)] 
copy: optionally check for SIGINT regularly, and abort operation safely

4 years agoMerge pull request #12927 from fbuihuu/coredump-cleanup-part-2
Zbigniew Jędrzejewski-Szmek [Wed, 17 Jul 2019 07:14:20 +0000 (09:14 +0200)] 
Merge pull request #12927 from fbuihuu/coredump-cleanup-part-2

Coredump cleanup part 2

4 years agoMerge pull request #13082 from ddstreet/minor
Zbigniew Jędrzejewski-Szmek [Wed, 17 Jul 2019 06:44:01 +0000 (08:44 +0200)] 
Merge pull request #13082 from ddstreet/minor

Minor fixes in test framework

4 years agotest/test-functions: fix install_dmeventd to correctly install bin/libs
Dan Streetman [Sun, 14 Jul 2019 03:03:26 +0000 (23:03 -0400)] 
test/test-functions: fix install_dmeventd to correctly install bin/libs

4 years agoFree up some resources on Azure Pipelines
Evgeny Vereshchagin [Wed, 17 Jul 2019 02:48:02 +0000 (02:48 +0000)] 
Free up some resources on Azure Pipelines

Let's drop the tests we also run on CentOS CI to free up some resources
for something more useful.

4 years agotest/test-functions: instmods call to find should use -type f 13082/head
Dan Streetman [Sun, 14 Jul 2019 01:39:03 +0000 (21:39 -0400)] 
test/test-functions: instmods call to find should use -type f

without using -type f, the logs print an error such as:

E:  E: modprobe: FATAL: Module asymmetric_keys not found in directory /lib/modules/4.15.0-54-generic

while this doesn't appear to cause problems, it can be extremely
distracting when trying to debug real failures.

4 years agotest: when stripping binaries, ignore case in suppressing "File format not recognized"
Dan Streetman [Sat, 13 Jul 2019 17:29:48 +0000 (13:29 -0400)] 
test: when stripping binaries, ignore case in suppressing "File format not recognized"

The grep -v matches all lowercase, but "file" is captialized; just ignore case so
it's suppressed for either all lowercase or capital File.

4 years agotest: ignore errors during test cleanup, so cleanup can finish
Dan Streetman [Fri, 12 Jul 2019 18:09:48 +0000 (14:09 -0400)] 
test: ignore errors during test cleanup, so cleanup can finish

Also move TESTDIR and STATEFILE removal into test_cleanup

4 years agotest: add create_empty_image_rootdir() to simplify testcase setup
Dan Streetman [Fri, 12 Jul 2019 15:47:26 +0000 (11:47 -0400)] 
test: add create_empty_image_rootdir() to simplify testcase setup

Almost all tests were manually mounting/unmounting $TESTDIR/root
from the loopback image; this moves all that into test-functions
so the test setup functions are simplier.

Also add test_setup_cleanup() function, to cleanup what is mounted
by create_empty_image_rootdir()

4 years agotest-network: drop warn_about_firewalld() as it is not necessary any more 12675/head
Yu Watanabe [Tue, 16 Jul 2019 01:12:35 +0000 (10:12 +0900)] 
test-network: drop warn_about_firewalld() as it is not necessary any more

4 years agotest-network: stop firewalld in setUpModule()
Yu Watanabe [Tue, 16 Jul 2019 01:12:05 +0000 (10:12 +0900)] 
test-network: stop firewalld in setUpModule()

4 years agotest-network: add tests for link state file vs resolvectl or timedatectl
Yu Watanabe [Mon, 3 Jun 2019 22:05:07 +0000 (07:05 +0900)] 
test-network: add tests for link state file vs resolvectl or timedatectl

4 years agoresolve: fix memleak
Yu Watanabe [Fri, 12 Jul 2019 05:19:36 +0000 (14:19 +0900)] 
resolve: fix memleak

4 years agobash-completion: support ntp-servers and revert command for timedatectl
Yu Watanabe [Tue, 28 May 2019 03:48:46 +0000 (12:48 +0900)] 
bash-completion: support ntp-servers and revert command for timedatectl

4 years agotimedatectl: add 'ntp-servers' and 'revert' commands to modify link NTP servers
Yu Watanabe [Tue, 28 May 2019 03:07:47 +0000 (12:07 +0900)] 
timedatectl: add 'ntp-servers' and 'revert' commands to modify link NTP servers

4 years agoresolvectl: support networkd managed interfaces
Yu Watanabe [Mon, 27 May 2019 01:50:52 +0000 (10:50 +0900)] 
resolvectl: support networkd managed interfaces

Closes #9808.

4 years agonetwork: implement DBus methods to set DNS related properties
Yu Watanabe [Sun, 26 May 2019 23:52:27 +0000 (08:52 +0900)] 
network: implement DBus methods to set DNS related properties

4 years agoresolve: expose dns_server_address_valid()
Yu Watanabe [Sun, 26 May 2019 23:35:28 +0000 (08:35 +0900)] 
resolve: expose dns_server_address_valid()

4 years agonetwork: introduce GetLinkByName and GetLinkByIndex bus methods
Yu Watanabe [Fri, 12 Jul 2019 02:11:08 +0000 (11:11 +0900)] 
network: introduce GetLinkByName and GetLinkByIndex bus methods

4 years agonetwork: implement ListLinks DBus method
Yu Watanabe [Sun, 26 May 2019 20:35:52 +0000 (05:35 +0900)] 
network: implement ListLinks DBus method

4 years agonetwork: move manager dbus prototypes to networkd-manager-bus.h
Yu Watanabe [Tue, 2 Jul 2019 14:26:03 +0000 (23:26 +0900)] 
network: move manager dbus prototypes to networkd-manager-bus.h

4 years agoMerge pull request #13069 from yuwata/network-do-not-set-routes-when-carrier-lost
Yu Watanabe [Tue, 16 Jul 2019 21:56:32 +0000 (06:56 +0900)] 
Merge pull request #13069 from yuwata/network-do-not-set-routes-when-carrier-lost

network: do not configure routes when dropping addresses

4 years agopid1: make sure to restore correct default values for some rlimits
Franck Bui [Wed, 10 Jul 2019 15:00:46 +0000 (17:00 +0200)] 
pid1: make sure to restore correct default values for some rlimits

Commit fb39af4ce42d7ef9af63009f271f404038703704 forgot to restore the default
rlimit values (RLIMIT_NOFILE and RLIMIT_MEMLOCK) while PID1 is reloading.

This patch extracts the code in charge of initializing the default values for
those rlimits in order to create dedicated functions, which take care of their
initialization.

These functions are then called in parse_configuration() so we make sure that
the default values for these rlimits get restored every time PID1 is reloading
its configuration.

4 years agoMerge pull request #12851 from evverx/test-01-basic-asan
Frantisek Sumsal [Tue, 16 Jul 2019 18:51:59 +0000 (18:51 +0000)] 
Merge pull request #12851 from evverx/test-01-basic-asan

tests: run TEST-01-BASIC under ASAN+UBSan again

4 years agoMerge pull request #13077 from poettering/activate-n-fds
Frantisek Sumsal [Tue, 16 Jul 2019 18:46:30 +0000 (18:46 +0000)] 
Merge pull request #13077 from poettering/activate-n-fds

activate: move array allocation to heap

4 years agoMerge pull request #13076 from keszybz/pr/13062
Zbigniew Jędrzejewski-Szmek [Tue, 16 Jul 2019 18:02:26 +0000 (20:02 +0200)] 
Merge pull request #13076 from keszybz/pr/13062

Timer formatting fixes

4 years agotest-network: extend sleep time 13069/head
Yu Watanabe [Tue, 16 Jul 2019 16:01:07 +0000 (01:01 +0900)] 
test-network: extend sleep time

Even if addresses provided by DHCP is assigned, the state file may not
be written yet, or resolved may not receive the state change signal
yet, or resolved may not process the signal yet...

4 years agonetwork: do not configure routes when dropping addresses
Yu Watanabe [Tue, 16 Jul 2019 04:02:38 +0000 (13:02 +0900)] 
network: do not configure routes when dropping addresses

Follow-up for 4ff296b02411bb4f0dc38f48cbab06f8645d2a08.

4 years agocoredump: (void)ify all calls of iovw_put_string_field() where we ignore failure... 12927/head
Franck Bui [Fri, 5 Jul 2019 13:35:47 +0000 (15:35 +0200)] 
coredump: (void)ify all calls of iovw_put_string_field() where we ignore failure on purpose

All those calls are dealing with optional metadata.

4 years agocoredump: gather all process metadata in iovecs first and then cache them
Franck Bui [Thu, 27 Jun 2019 16:23:01 +0000 (18:23 +0200)] 
coredump: gather all process metadata in iovecs first and then cache them

Now we first gather all process metadata and populate the process info cache
with them. In this way, the cache only references metadata recorded in iovecs[]
so there's no need to bother freeing (part of) cached metadata later.

The other advantage is that the coredump handler mode and the service mode are
more similar as the cache is populated in the same way for both cases.

It also renames the array indexes so it becomes clear which metadata are passed
by the kernel and which ones are retrieved from the runtime environment.

4 years agocoredump: use 'input_fd' name for the pipe fd passed by the kernel everywhere
Franck Bui [Fri, 28 Jun 2019 04:52:07 +0000 (06:52 +0200)] 
coredump: use 'input_fd' name for the pipe fd passed by the kernel everywhere

'input_fd' variable name is used mostly everywhere except in process_socket()
where it's named 'coredump_fd', which is pretty confusing since 'coredump_fd'
is used for the coredump filename in submit_coredump().

So let's use 'input_fd' consistently as name for the pipe fd passed by the
kernel.

No functional changes.

4 years agoMerge pull request #13038 from poettering/pam-fixes
Zbigniew Jędrzejewski-Szmek [Tue, 16 Jul 2019 15:09:29 +0000 (17:09 +0200)] 
Merge pull request #13038 from poettering/pam-fixes

tmpfiles factory PAM tweaks

4 years agotests: bump up QEMU_MEM 12851/head
Evgeny Vereshchagin [Tue, 16 Jul 2019 15:01:26 +0000 (15:01 +0000)] 
tests: bump up QEMU_MEM

4 years agotests: run TEST-01-BASIC under ASAN+UBSan again
Evgeny Vereshchagin [Tue, 16 Jul 2019 15:01:04 +0000 (15:01 +0000)] 
tests: run TEST-01-BASIC under ASAN+UBSan again

Not that `journalctl --flush` is no longer flaky, it should be
safe to bring the test back.

4 years agoMerge pull request #12925 from yuwata/network-generator
Lennart Poettering [Tue, 16 Jul 2019 14:23:42 +0000 (16:23 +0200)] 
Merge pull request #12925 from yuwata/network-generator

network-generator: introduce new tool systemd-network-generator

4 years agoMerge pull request #13074 from poettering/format-tree-many
Lennart Poettering [Tue, 16 Jul 2019 14:03:54 +0000 (16:03 +0200)] 
Merge pull request #13074 from poettering/format-tree-many

table_add_many() improvements

4 years agoMerge pull request #13073 from poettering/variety-galore
Lennart Poettering [Tue, 16 Jul 2019 13:59:31 +0000 (15:59 +0200)] 
Merge pull request #13073 from poettering/variety-galore

Variety galore

4 years agojournal: properly read unaligned le64 integers 13077/head
Lennart Poettering [Tue, 16 Jul 2019 13:22:26 +0000 (15:22 +0200)] 
journal: properly read unaligned le64 integers

Fixes: #13051
Replaces: #13064

4 years agoactivate: move array allocation to heap
Lennart Poettering [Tue, 16 Jul 2019 12:52:07 +0000 (14:52 +0200)] 
activate: move array allocation to heap

In theory 'n' could get quite large, and some sanitizers notice that,
let's hence avoid the stack, and use the heap instead.

Moreover, there's no need to include the first 3 fds in the array,
close_all() excludes those anyway.

See: #13064

4 years agowait-online: change log level
Yu Watanabe [Tue, 16 Jul 2019 01:21:18 +0000 (10:21 +0900)] 
wait-online: change log level

During boot, systemd-networkd-wait-online writes following logs many
times:
```
systemd-networkd-wait-online[753]: lo: link is ignored
```

4 years agoMerge pull request #13067 from yuwata/news-network-section
Zbigniew Jędrzejewski-Szmek [Tue, 16 Jul 2019 12:38:24 +0000 (14:38 +0200)] 
Merge pull request #13067 from yuwata/news-network-section

NEWS: update section name

4 years agodoc: update explanation of IPv6AcceptRA=
Yu Watanabe [Tue, 16 Jul 2019 01:46:27 +0000 (10:46 +0900)] 
doc: update explanation of IPv6AcceptRA=

4 years agotree-wide: use lowercase table headers 13076/head
Zbigniew Jędrzejewski-Szmek [Tue, 16 Jul 2019 11:32:51 +0000 (13:32 +0200)] 
tree-wide: use lowercase table headers

https://github.com/systemd/systemd/pull/13062#discussion_r303847484
> the formatter uppercases them anyway, and this way the JSON output of the
> formatter is nicer as it uses the table header fields 1:1 for the json
> output.