Li Song [Fri, 19 Oct 2018 17:41:51 +0000 (13:41 -0400)]
sd-dhcp: remove unreachable route after rebinding return NAK
Lennart Poettering [Fri, 19 Oct 2018 20:58:53 +0000 (22:58 +0200)]
Merge pull request #10470 from yuwata/log-message-updates
Log message updates
Yu Watanabe [Fri, 19 Oct 2018 18:00:46 +0000 (03:00 +0900)]
tree-wide: replace 'unsigned int' with 'unsigned'
Lennart Poettering [Fri, 19 Oct 2018 20:05:50 +0000 (22:05 +0200)]
Merge pull request #10462 from yuwata/test-sd-device-monitor
Add tests for sd_device_monitor and small cleanups
Yu Watanabe [Fri, 19 Oct 2018 16:59:52 +0000 (01:59 +0900)]
nspawn: do not include '%m' in log message if errno is zero
Yu Watanabe [Fri, 19 Oct 2018 16:55:32 +0000 (01:55 +0900)]
import: include error cause in log message
Yu Watanabe [Fri, 19 Oct 2018 16:55:06 +0000 (01:55 +0900)]
gpt-auto-generator: include error cause in log message
Yu Watanabe [Fri, 19 Oct 2018 16:54:52 +0000 (01:54 +0900)]
firstboot: include error cause in log message
Yu Watanabe [Fri, 19 Oct 2018 16:54:29 +0000 (01:54 +0900)]
dissect: include error cause in log message
Yu Watanabe [Fri, 19 Oct 2018 16:43:13 +0000 (01:43 +0900)]
coredump: include error cause in log message
Yu Watanabe [Fri, 19 Oct 2018 16:40:42 +0000 (01:40 +0900)]
core: include error cause in log message
Yu Watanabe [Fri, 19 Oct 2018 16:01:31 +0000 (01:01 +0900)]
cgtop: include error cause in log message
Yu Watanabe [Fri, 19 Oct 2018 15:57:53 +0000 (00:57 +0900)]
busctl: include error cause in log message
Yu Watanabe [Fri, 19 Oct 2018 15:52:45 +0000 (00:52 +0900)]
bootctl: include error cause in log message
Yu Watanabe [Fri, 19 Oct 2018 15:48:21 +0000 (00:48 +0900)]
fs-util: include error cause in log message
Yu Watanabe [Fri, 19 Oct 2018 15:46:33 +0000 (00:46 +0900)]
analyze: include error cause in the log message
Yu Watanabe [Fri, 19 Oct 2018 15:43:02 +0000 (00:43 +0900)]
analyze: update log message
Lennart Poettering [Fri, 19 Oct 2018 15:07:46 +0000 (17:07 +0200)]
tree-wide: some automatic coccinelle fixes (#10463)
Nothing fancy, just coccinelle doing its work.
Yu Watanabe [Fri, 19 Oct 2018 02:58:25 +0000 (11:58 +0900)]
test: add tests for sd_device_monitor
Lennart Poettering [Fri, 19 Oct 2018 08:48:41 +0000 (10:48 +0200)]
Merge pull request #10457 from yuwata/fuzz-11019
sd-dhcp: fixes oss-fuzz#11019 and several cleanups
Evgeny Vereshchagin [Thu, 18 Oct 2018 05:47:26 +0000 (05:47 +0000)]
core: stop ignoring errors in connect_logger_as
When journald reaches the maximum number of active streams, it,
basically, starts to decline new connections. On the client
side it can be detected by getting EPIPE and, if the writing
process isn't lucky enough, getting SIGPIPE soon afterwards.
systemd has always ignored EPIPE, which makes it very hard
to keep track of services losing logs. This patch should make
it easier to detect such services by just staring at the logs
carefully.
In case anyone is interested, the following one-liner run as any user
can be used to paralyze all the stream logging on a machine:
for i in {1..4096}; do systemd-cat -t HEY-$i & done
Lennart Poettering [Fri, 19 Oct 2018 08:12:00 +0000 (10:12 +0200)]
Merge pull request #10460 from yuwata/setsockopt_int-more
tree-wide: use setsockopt_int() more
Yu Watanabe [Fri, 19 Oct 2018 02:57:54 +0000 (11:57 +0900)]
sd-device-monitor: include error cause in log message
Yu Watanabe [Fri, 19 Oct 2018 02:57:29 +0000 (11:57 +0900)]
sd-device-monitor: drop unnecessary condition
Lennart Poettering [Fri, 19 Oct 2018 00:04:12 +0000 (02:04 +0200)]
core: beautify per-unit consumed resources log message a bit. (#10390)
Shorten message to say "no IP traffic" if there is no IP traffic, rather
than "received 0B IP traffic, sent 0B IP traffic".
Fixes: #9816
Yu Watanabe [Thu, 18 Oct 2018 23:57:51 +0000 (08:57 +0900)]
Merge pull request #10437 from poettering/env-util-love
some env-util.c love
Yu Watanabe [Thu, 18 Oct 2018 23:48:37 +0000 (08:48 +0900)]
Merge pull request #10389 from poettering/nspawn-path-fix
nspawn $PATH execvpe() fix
Yu Watanabe [Thu, 18 Oct 2018 23:44:51 +0000 (08:44 +0900)]
Merge pull request #10450 from poettering/foreach-line-excorcism
FOREACH_LINE excorcism
Yu Watanabe [Thu, 18 Oct 2018 23:36:01 +0000 (08:36 +0900)]
Merge pull request #10447 from poettering/fgets-excorcism
let's get rid of fgets()
Yu Watanabe [Thu, 18 Oct 2018 21:11:49 +0000 (06:11 +0900)]
sd-dhcp6: drop empty 'error' label
Yu Watanabe [Thu, 18 Oct 2018 19:59:18 +0000 (04:59 +0900)]
test-dhcp6-client: normalize logs
Yu Watanabe [Thu, 18 Oct 2018 18:45:46 +0000 (03:45 +0900)]
fuzz: add testcase of oss-fuzz#11019
Yu Watanabe [Thu, 18 Oct 2018 18:42:10 +0000 (03:42 +0900)]
sd-dhcp6: make dhcp6_option_parse_domainname() not store empty domain
This improves performance of fuzzer.
C.f. oss-fuzz#11019.
Yu Watanabe [Thu, 18 Oct 2018 18:40:30 +0000 (03:40 +0900)]
sd-dhcp6: do not update serverid when ENOMEM
Yu Watanabe [Thu, 18 Oct 2018 18:38:59 +0000 (03:38 +0900)]
sd-dhcp6: coding style cleanups
Yu Watanabe [Thu, 18 Oct 2018 18:44:56 +0000 (03:44 +0900)]
sd-dhcp6: fix argument and error handling of dhcp6_option_parse_status()
Yu Watanabe [Thu, 18 Oct 2018 21:03:19 +0000 (06:03 +0900)]
resolved-mdns: use TAKE_FD()
Yu Watanabe [Thu, 18 Oct 2018 20:58:03 +0000 (05:58 +0900)]
resolved-llmnr: use TAKE_FD()
Yu Watanabe [Thu, 18 Oct 2018 20:39:55 +0000 (05:39 +0900)]
tree-wide: use setsockopt_int() more
Lennart Poettering [Thu, 18 Oct 2018 19:53:01 +0000 (21:53 +0200)]
Merge pull request #10456 from poettering/setsockopt-int
add a setsockopt_int() helper and make use of it everywhere
Lennart Poettering [Thu, 18 Oct 2018 18:59:24 +0000 (20:59 +0200)]
tests: clean up again after running tests (#10446)
Currently, if I run the full "run-integration-tests.sh" script it will
fail on my machine because it fills up /var/tmp whith just too much
crap until the disk is full.
Let's make sure that "run-integration-tests.sh" cleans up after every
test. For that change the make targets to run from "clean setup run" to
"clean setup run clean" — except that that doesn't work since make is
smart enough to realize that the same target appears twice on the
command line and will only execute it once. Let's fix that by defining
another target "clean-again" which is just like "clean", but allows us
to be added to the same command line a second time. Then, let's build
with "clean setup run clean-again" and all is good.
While we are at it, let's also add .PHONY where appropriate, after all
these all are phony targets.
Lennart Poettering [Thu, 18 Oct 2018 18:55:30 +0000 (20:55 +0200)]
job: add a comment that JOB_DONE also means skipped due to condition (#10453)
Lennart Poettering [Thu, 18 Oct 2018 17:49:18 +0000 (19:49 +0200)]
util: drop const_int_one/const_int_zero again
There's only a single user remaining now that we have setsockopt_int(),
let's define those variables locally.
This more or less reverts
6d5e65f6454212cd400d0ebda34978a9f20cc26a.
Lennart Poettering [Thu, 18 Oct 2018 17:48:18 +0000 (19:48 +0200)]
tree-wide: introduce setsockopt_int() helper and make use of it everywhere
As suggested by @heftig:
https://github.com/systemd/systemd/commit/
6d5e65f6454212cd400d0ebda34978a9f20cc26a#commitcomment-
30938667
Lennart Poettering [Thu, 18 Oct 2018 15:10:42 +0000 (17:10 +0200)]
efi: rework OFFSETOF() based on __builtin_offsetof()
Since both LLVM and gcc supported this for a long time, we are not
adding a fallback compat kludge. And even if there's some relevant
compiler that doesn't know this concept, it'll fail with a compiler
error, and we'll fix it then.
As suggested by @keszybz:
https://github.com/systemd/systemd/pull/10174#discussion_r226266540
Lennart Poettering [Thu, 18 Oct 2018 16:30:38 +0000 (18:30 +0200)]
Merge pull request #10239 from yuwata/sd-device-monitor
sd-device: introduce sd_device_monitor
Lennart Poettering [Thu, 18 Oct 2018 16:05:58 +0000 (18:05 +0200)]
Merge pull request #10407 from yuwata/netlink-slot
sd-netlink: introduce sd_netlink_slot object and relevant functions
Lennart Poettering [Sat, 13 Oct 2018 11:12:56 +0000 (13:12 +0200)]
test: check for putenv() failures, the call might theortically fail
Lennart Poettering [Sat, 13 Oct 2018 11:12:32 +0000 (13:12 +0200)]
exec-util: errors are reported by non-zero, not negative by putenv()
Lennart Poettering [Sat, 13 Oct 2018 11:11:32 +0000 (13:11 +0200)]
nspawn: use container $PATH (not host $PATH) when searching for PID 1 binaries to execute
Fixes: #10377
Zbigniew Jędrzejewski-Szmek [Thu, 18 Oct 2018 11:46:01 +0000 (13:46 +0200)]
mkosi: use Fedora 29
F29 is at beta now, but should be out within two or three weeks, by the time
next systemd release happens.
Lennart Poettering [Thu, 18 Oct 2018 14:21:05 +0000 (16:21 +0200)]
tmpfiles: FOREACH_LINE excorcism
Lennart Poettering [Thu, 18 Oct 2018 14:20:43 +0000 (16:20 +0200)]
sysv-generator: FOREACH_LINE excorcism
Lennart Poettering [Thu, 18 Oct 2018 14:18:52 +0000 (16:18 +0200)]
sysusers: FOREACH_LINE excorcism
Lennart Poettering [Thu, 18 Oct 2018 14:18:35 +0000 (16:18 +0200)]
install: pass encountered error number to log_syntax()
Lennart Poettering [Thu, 18 Oct 2018 14:18:20 +0000 (16:18 +0200)]
install: FOREACH_LINE excorcism
Lennart Poettering [Thu, 18 Oct 2018 14:18:01 +0000 (16:18 +0200)]
clean-ipc: FOREACH_LINE excorcism
Lennart Poettering [Thu, 18 Oct 2018 14:17:23 +0000 (16:17 +0200)]
resolved-resolv-conf: FOREACH_LINE excorcism
Lennart Poettering [Thu, 18 Oct 2018 14:16:52 +0000 (16:16 +0200)]
resolved-etc-hosts: FOREACH_LINE excorcism
Lennart Poettering [Thu, 18 Oct 2018 14:16:06 +0000 (16:16 +0200)]
resolved-dns-trust-anchor: FOREACH_LINE excorcism
Also, properly ignore these read errors, and say so.
Lennart Poettering [Thu, 18 Oct 2018 14:15:35 +0000 (16:15 +0200)]
localectl: FOREACH_LINE excorcism
Lennart Poettering [Thu, 18 Oct 2018 14:15:18 +0000 (16:15 +0200)]
sd-path: FOREACH_LINE exorcism
Lennart Poettering [Thu, 18 Oct 2018 14:14:59 +0000 (16:14 +0200)]
bus-creds: FOREACH_LINE excorcism
Lennart Poettering [Thu, 18 Oct 2018 14:14:42 +0000 (16:14 +0200)]
coredump: FOREACH_LINE excorcism
Lennart Poettering [Thu, 18 Oct 2018 14:14:25 +0000 (16:14 +0200)]
smack-setup: include error cause in log message
Lennart Poettering [Thu, 18 Oct 2018 14:14:12 +0000 (16:14 +0200)]
smcak-setup: FOREACH_LINE excorcism
Lennart Poettering [Thu, 18 Oct 2018 14:12:40 +0000 (16:12 +0200)]
shutdown: FOREACH_LINE() excorcism
Lennart Poettering [Thu, 18 Oct 2018 14:12:06 +0000 (16:12 +0200)]
ima-setup: prefer safe_close() over plain close()
Lennart Poettering [Thu, 18 Oct 2018 14:11:54 +0000 (16:11 +0200)]
ima-setup: include error cause in failure messages
Lennart Poettering [Thu, 18 Oct 2018 14:10:37 +0000 (16:10 +0200)]
ima-setup: FOREACH_LINE excorcism
Lennart Poettering [Thu, 18 Oct 2018 14:09:53 +0000 (16:09 +0200)]
cgroup: FOREACH_LINE excorcism
Lennart Poettering [Thu, 18 Oct 2018 14:09:19 +0000 (16:09 +0200)]
time-util: FOREACH_LINE excorcism
Lennart Poettering [Thu, 18 Oct 2018 14:08:51 +0000 (16:08 +0200)]
process-util: FOREACH_LINE excorcism
Lennart Poettering [Thu, 18 Oct 2018 14:08:30 +0000 (16:08 +0200)]
mount-util: FOREACH_LINE() excorcism
Lennart Poettering [Thu, 18 Oct 2018 14:08:13 +0000 (16:08 +0200)]
cgroup-util: FOREACH_LINE() excorcism
Zbigniew Jędrzejewski-Szmek [Thu, 18 Oct 2018 14:06:01 +0000 (16:06 +0200)]
Merge pull request #10174 from poettering/sd-boot-counter-efi
the EFI changes from PR #9437 (the boot counting PR)
Yu Watanabe [Thu, 18 Oct 2018 08:50:25 +0000 (17:50 +0900)]
bus-unit-util: use streq() instead of STR_IN_SET()
Follow-up for
90fc172e191f44979005a524521112f2bd1ff21b (#10308).
Lennart Poettering [Thu, 18 Oct 2018 11:41:09 +0000 (13:41 +0200)]
udev-rules: fgets() excorcism
Lennart Poettering [Thu, 18 Oct 2018 11:40:55 +0000 (13:40 +0200)]
condition: fgets() excorcism
Lennart Poettering [Thu, 18 Oct 2018 11:40:39 +0000 (13:40 +0200)]
reply-password: fgets() excorcism
Lennart Poettering [Thu, 18 Oct 2018 11:40:21 +0000 (13:40 +0200)]
modules-load: fgets() excorcism
Lennart Poettering [Thu, 18 Oct 2018 11:40:03 +0000 (13:40 +0200)]
keymap-util: fgets() excorcism
Lennart Poettering [Thu, 18 Oct 2018 11:39:41 +0000 (13:39 +0200)]
hwdb: fgets() excorcism
Lennart Poettering [Thu, 18 Oct 2018 11:39:29 +0000 (13:39 +0200)]
catalog: fgets() excorcism
Lennart Poettering [Thu, 18 Oct 2018 11:34:40 +0000 (13:34 +0200)]
cryptsetup-generator: fgets() excorcism
Lennart Poettering [Thu, 18 Oct 2018 11:34:12 +0000 (13:34 +0200)]
cgtop: fgets() excorcism
Lennart Poettering [Thu, 18 Oct 2018 11:33:19 +0000 (13:33 +0200)]
binfmt: fgets() excorcism
Also, let's not claim we ignored errors when we don't.
Lennart Poettering [Thu, 18 Oct 2018 11:33:00 +0000 (13:33 +0200)]
binfmt: validate rule file name before using it
Lennart Poettering [Thu, 18 Oct 2018 11:32:34 +0000 (13:32 +0200)]
terminal-util: use fgetc() carefully instead of fread()
Lennart Poettering [Thu, 18 Oct 2018 11:32:05 +0000 (13:32 +0200)]
terminal-util: excorcise fgets()
Lennart Poettering [Thu, 18 Oct 2018 11:30:20 +0000 (13:30 +0200)]
clock-util: excorcise fgets()
Michael Biebl [Wed, 17 Oct 2018 22:56:41 +0000 (00:56 +0200)]
docs: use h2 headers
The primer theme does not add a mouse-over anchor link for h1 headers.
So use h2 for subsection headers which looks nicer anyway.
Followup for #10421
Anita Zhang [Mon, 8 Oct 2018 03:28:36 +0000 (20:28 -0700)]
core: implement per unit journal rate limiting
Add LogRateLimitIntervalSec= and LogRateLimitBurst= options for
services. If provided, these values get passed to the journald
client context, and those values are used in the rate limiting
function in the journal over the the journald.conf values.
Part of #10230
Yu Watanabe [Tue, 16 Oct 2018 17:32:26 +0000 (02:32 +0900)]
resolve: set IP_RECVERR
Closes #10345.
Yu Watanabe [Wed, 17 Oct 2018 21:20:41 +0000 (06:20 +0900)]
Merge pull request #10438 from poettering/path-is-valid
be a bit more carful when processing transient socket paths via the bus
Lennart Poettering [Wed, 17 Oct 2018 20:55:00 +0000 (22:55 +0200)]
Merge pull request #10439 from poettering/job-struct-init
three trivial simplifications/clean-ups
Lennart Poettering [Wed, 17 Oct 2018 20:54:34 +0000 (22:54 +0200)]
Merge pull request #10440 from poettering/fflush-and-check-some-more
use fflush_and_check() and free_and_replace() where we can
Lennart Poettering [Wed, 17 Oct 2018 19:29:10 +0000 (21:29 +0200)]
Merge pull request #10428 from keszybz/failure-actions
Implement manager status changes using SuccessAction=
Lennart Poettering [Wed, 17 Oct 2018 18:18:27 +0000 (20:18 +0200)]
service: use free_and_replace() where we can
Lennart Poettering [Wed, 17 Oct 2018 18:14:51 +0000 (20:14 +0200)]
exec-util: use fflush_and_check() where appropriate