Yu Watanabe [Wed, 10 Jul 2019 14:04:49 +0000 (23:04 +0900)]
Merge pull request #12863 from 1848/if_xfrm
Added support for xfrm interfaces
1848 [Mon, 8 Jul 2019 15:10:26 +0000 (17:10 +0200)]
Fixed condition checked twice
1848 [Mon, 8 Jul 2019 15:09:46 +0000 (17:09 +0200)]
Added support for xfrm interfaces
Lennart Poettering [Wed, 10 Jul 2019 12:57:14 +0000 (14:57 +0200)]
Merge pull request #12939 from yuwata/lgtm-fixes
make LGTM quiet
Zbigniew Jędrzejewski-Szmek [Mon, 1 Jul 2019 13:31:08 +0000 (15:31 +0200)]
systemctl: allow "cat" on units with bad settings
That's precisely the state where 'cat' is particularly useful ;).
Yu Watanabe [Tue, 9 Jul 2019 16:02:07 +0000 (01:02 +0900)]
network: fix memleak
set_put() does not return -EEXIST.
Fixes #12995 and oss-fuzz#15678.
Evgeny Vereshchagin [Wed, 10 Jul 2019 01:46:35 +0000 (03:46 +0200)]
fuzzbuzz: rename fuzz.yaml to fuzzbuzz.yaml
fuzz.yaml will stop working in a week
Dave Reisner [Sat, 6 Jul 2019 16:20:53 +0000 (12:20 -0400)]
importd: Avoid need for fd translation table
Make use of curl_multi_assign to associate each IO sd_event_source with
a CURL object. This means we always get passed the right event source
and don't need to worry about looking up the associated CURL object,
particularly in the case where the FD has been closed on a REMOVE event.
Yu Watanabe [Tue, 9 Jul 2019 07:56:50 +0000 (16:56 +0900)]
network: read sysctl value only once (#12990)
Follow-up for
bafa9641446852f7fa15ca12d08a223d345c78ea.
When the value is changed, networkd needs to be restarted.
Yu Watanabe [Fri, 21 Jun 2019 03:56:54 +0000 (12:56 +0900)]
util: fix sign-compare warning
Dan Streetman [Fri, 5 Jul 2019 15:24:55 +0000 (11:24 -0400)]
test/udev-test.pl: cleanup if skipping test
In Ubuntu CI, udev-test.pl is run from the debian/test/udev script,
in a test dir created for it; but udev-test.pl setup mounts a
dir, so if it doesn't cleanup/unmount before exiting, the test dir
autopkgtest created for it can't be removed, and autopkgtest
aborts the entire test suite, for example this output (from a
test run inside an armhf container):
autopkgtest [12:45:36]: test udev: [-----------------------
umount: test/tmpfs: no mount point specified.
mknod: test/tmpfs/dev/null: Operation not permitted
unable to create test/tmpfs/dev/null at ./udev-test.pl line 1611.
Failed to set up the environment, skipping the test at ./udev-test.pl line 1731.
autopkgtest [12:45:41]: test udev: -----------------------]
autopkgtest [12:45:44]: test udev: - - - - - - - - - - results - - - - - - - - - -
udev FAIL non-zero exit status 77
rm: cannot remove '/tmp/autopkgtest.ocPFA6/autopkgtest_tmp/test/tmpfs': Device or resource busy
autopkgtest [12:46:22]: ERROR: "rm -rf /tmp/autopkgtest.ocPFA6/udev-artifacts /tmp/autopkgtest.ocPFA6/autopkgtest_tmp" failed with stderr "rm:
Evgeny Vereshchagin [Mon, 8 Jul 2019 23:27:39 +0000 (02:27 +0300)]
Merge pull request #12992 from mrc0mmand/test-functions-fixes
Various test/test-functions fixes/improvements
Zbigniew Jędrzejewski-Szmek [Mon, 8 Jul 2019 12:18:46 +0000 (14:18 +0200)]
pid1: fix serialization/deserialization of commmands with spaces
Fixes #12258.
This is enough to reproduce:
$ systemd-run bash -c 'sleep 10' && systemctl daemon-reload
would result in
Current command vanished from the unit file.
We would serialize as:
ExecStart 0 /usr/bin/bash /usr/bin/bash -c sleep 10000
which of course can't work.
Now we serialize as
ExecStart 0 /usr/bin/bash "/usr/bin/bash" "-c" "sleep 10".
Zbigniew Jędrzejewski-Szmek [Mon, 8 Jul 2019 13:16:41 +0000 (15:16 +0200)]
nspawn: fix abort when we cannot execve
If execve failed, we would die in safe_close(), because master was already
closed by fdset_close_others() on line 3123. IIUC, we don't need to keep the
fd open after sending it, so let's just close it immediately.
Reproducer:
sudo build/systemd-nspawn -M rawhide fooooooo
Fixup for
3acc84ebd9aebe8cf1771b42644ebbfbecdfaa37.
Zbigniew Jędrzejewski-Szmek [Mon, 8 Jul 2019 22:47:06 +0000 (00:47 +0200)]
Merge pull request #12972 from intelfx/cryptsetup-enable-libcryptsetup-debug
cryptsetup: properly handle libcryptsetup debug logging
Frantisek Sumsal [Mon, 8 Jul 2019 19:28:10 +0000 (21:28 +0200)]
test: install missing dependencies for CIs
Frantisek Sumsal [Mon, 8 Jul 2019 19:11:32 +0000 (21:11 +0200)]
test: drop || return 1 expression which is incompatible with set -e
The `set -e` option is incompatible with a subshell/compound command,
which is followed by || <EXPR>. In such case, the -e option is ignored
in all affected subshells/functions (see man bash(1) for command `set`).
Frantisek Sumsal [Mon, 8 Jul 2019 19:10:21 +0000 (21:10 +0200)]
test: be a little bit more verbose when installing service binaries
Frantisek Sumsal [Mon, 8 Jul 2019 19:05:51 +0000 (21:05 +0200)]
test: correctly handle installation of newly introduced binaries
In certain cases we might attempt to install a binary which is already
present in the test image, yet it's missing from the host system.
In such cases, let's check if the binary indeed exists in the image
before doing any other chcecks. If it does, immediately return with
success.
This was discovered during installation of
/usr/lib/systemd/systemd-bless-boot, which was not present in Ubuntu CI
(as the installed systemd was from the Ubuntu repositories), and the
binary itself was already in the image thanks to `ninja install`.
However, during extraction of binaries from the systemd service files,
another attempt to install this binary was made, which failed due to
`find_binary` being unable to find it.
Frantisek Sumsal [Mon, 8 Jul 2019 11:47:46 +0000 (13:47 +0200)]
test: make ASAN/UBSAN_OPTIONS overridable from the outside
This should allow us to tweak the ASAN_OPTIONS and UBSAN_OPTIONS env
variables for integration tests as well
Zbigniew Jędrzejewski-Szmek [Mon, 8 Jul 2019 14:55:31 +0000 (16:55 +0200)]
FUNDING: this needs to be yaml
Zbigniew Jędrzejewski-Szmek [Mon, 8 Jul 2019 13:43:55 +0000 (15:43 +0200)]
Create FUNDING.yml
Ivan Shapovalov [Sat, 6 Jul 2019 10:51:55 +0000 (13:51 +0300)]
growfs: call crypt_set_debug_level() correctly, skip if not needed
Ivan Shapovalov [Sat, 6 Jul 2019 10:51:23 +0000 (13:51 +0300)]
cryptsetup: enable libcryptsetup debug logging if we want it
Even if we set a log callback that would accept debug messages, libcryptsetup
needs debug logging enabled explicitly for it to happen.
Yu Watanabe [Mon, 8 Jul 2019 12:18:04 +0000 (21:18 +0900)]
Merge pull request #12970 from ddstreet/gh12969
src/network/networkd-dhcp4.c: set prefsrc for classless or static routes
RussianNeuroMancer [Sun, 7 Jul 2019 15:17:56 +0000 (23:17 +0800)]
Add accel mount matrix for Irbis TW90
Lennart Poettering [Sun, 7 Jul 2019 15:28:57 +0000 (17:28 +0200)]
units: add SystemCallErrorNumber=EPERM to systemd-portabled.service
We use that on all other services, and hence should here too. Otherwise
the service will be killed with SIGSYS when doing something not
whitelisted, which is a bit crass.
Evgeny Vereshchagin [Sun, 7 Jul 2019 16:17:17 +0000 (18:17 +0200)]
semaphore: pass allow-releaseinfo-change to apt-get
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=929248
Ivan Shapovalov [Sat, 6 Jul 2019 10:48:50 +0000 (13:48 +0300)]
cryptsetup: set libcryptsetup global log callback too
Ivan Shapovalov [Sat, 6 Jul 2019 10:47:06 +0000 (13:47 +0300)]
basic/log: fix SYSTEMD_LOG_* parsing error messages
(likely a copy-paste gone wrong)
Yu Watanabe [Fri, 5 Jul 2019 21:43:28 +0000 (06:43 +0900)]
test-network: add tests for DHCP.UseRoutes=no with custom route settings
This adds test for
b5799eeb0787deacb30d5984f6ac78f88f23b97e.
Closes #12951.
Yu Watanabe [Fri, 5 Jul 2019 22:39:17 +0000 (07:39 +0900)]
test-network: add testcase for DHCP client with static address
Testcase for #12969.
Dan Streetman [Fri, 5 Jul 2019 20:42:38 +0000 (16:42 -0400)]
src/network/networkd-dhcp4.c: set prefsrc for classless or static routes
When a DHCP server provides only a gateway, the networkd-dhcp4 code adds a
default route using that gateway, and sets the just-provided address as
the route's prefsrc; this was added in commit
46b0c76e2c355c0d0cc4792abb98cde07b28bc53
However, if the DHCP server has also provided classless route(s), these
are used instead of a default route using the provided gateway; the
networkd-dhcp4 code sets up the classless routes, but does not use the
just-provided dhcp address as the prefsrc of the route(s). Note that
it also doesn't set the prefsrc for static routes, though it should.
If the interface has only the dhcp-provided address, this is not usually
a problem, but if it has another address (e.g. a static address), then
traffic sent through the dhcp-provided gateway might not use the
dhcp-provided source address. If the gateway router only will route
traffic from the dhcp-provided address, then the dhcp client system's
networking through the router will not work.
Fixes: #12969
Lennart Poettering [Wed, 29 May 2019 20:09:26 +0000 (22:09 +0200)]
login: move file definitions outside of the conditionalization
Zbigniew Jędrzejewski-Szmek [Fri, 5 Jul 2019 11:58:21 +0000 (13:58 +0200)]
Merge pull request #12964 from yuwata/network-bridge-vlan-issue-12958
network: fix BridgeVLAN issue
Yu Watanabe [Fri, 5 Jul 2019 08:15:00 +0000 (17:15 +0900)]
Merge pull request #12963 from keszybz/analyze-timestamp
systemd-analyze dump fixup
Yu Watanabe [Thu, 4 Jul 2019 19:43:27 +0000 (04:43 +0900)]
test-network: add tests for BridgeVLAN
Yu Watanabe [Fri, 5 Jul 2019 07:37:34 +0000 (16:37 +0900)]
network: fix issue found by UBSan
Yu Watanabe [Thu, 4 Jul 2019 20:48:21 +0000 (05:48 +0900)]
network: fix the initial value of the counter for brvlan
Fixes #12958.
Yu Watanabe [Thu, 4 Jul 2019 20:37:25 +0000 (05:37 +0900)]
network: re-implement parse_vid_range()
Yu Watanabe [Fri, 5 Jul 2019 07:34:01 +0000 (16:34 +0900)]
network: minor coding-style update
Lennart Poettering [Tue, 28 May 2019 12:19:18 +0000 (14:19 +0200)]
varlink: add varlink server to event loop only if there is one
Zbigniew Jędrzejewski-Szmek [Thu, 4 Jul 2019 17:12:03 +0000 (19:12 +0200)]
pid1: use monotonic timestamp in dump if realtime is not available
$ systemd-analyze dump | head -3
Timestamp firmware: (null)
Timestamp loader: (null)
Timestamp kernel: Mon 2019-07-01 17:21:02 CEST
Since this is a debugging interface, it is OK to change the output format.
The user can infer what "Timestamp firmware: 123.456ms" means.
Yu Watanabe [Wed, 3 Jul 2019 18:46:14 +0000 (03:46 +0900)]
test-network: show debug logs of networkd
Lennart Poettering [Thu, 4 Jul 2019 14:54:39 +0000 (16:54 +0200)]
portabled: Make use of SYNTHETIC_ERRNO()
Yu Watanabe [Wed, 3 Jul 2019 15:09:31 +0000 (00:09 +0900)]
firewall-util: use fixed size array for chain name
xt_chainlabel is defined as
```
typedef char xt_chainlabel[32];
```
Yu Watanabe [Wed, 3 Jul 2019 14:56:17 +0000 (23:56 +0900)]
tree-wide: introduce strerror_safe()
Yu Watanabe [Wed, 3 Jul 2019 14:55:45 +0000 (23:55 +0900)]
dhcp: replace strerror() with %m
Yu Watanabe [Wed, 3 Jul 2019 14:27:27 +0000 (23:27 +0900)]
sd-event: replace snprintf() with strpcpyf()
Lennart Poettering [Sun, 23 Dec 2018 18:22:12 +0000 (19:22 +0100)]
fsck: split out fsck return code definitions into a header file of its own
This way we can make use of it from other components too, such as
systemd-homed.
Lennart Poettering [Sun, 23 Dec 2018 18:19:51 +0000 (19:19 +0100)]
dissect: split out DM deferred remove into src/shared/dm-util.c
The function is generally useful, let's split it out so that we can make
use of it later on in systemd-homed.
Zbigniew Jędrzejewski-Szmek [Thu, 4 Jul 2019 17:10:11 +0000 (19:10 +0200)]
basic/time-util: add helper function to check if timestamp is set
No functional change.
Philip Withnall [Wed, 3 Jul 2019 13:00:48 +0000 (14:00 +0100)]
man: Add some notes about variable $prefix for StateDirectory=
tl;dr: It isn’t supported.
Wording by Zbigniew Jędrzejewski-Szmek.
See https://twitter.com/pid_eins/status/
1102639279614906369 and
https://gitlab.freedesktop.org/libfprint/fprintd/merge_requests/5#note_125536
onwards.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Lennart Poettering [Thu, 4 Jul 2019 13:46:02 +0000 (15:46 +0200)]
Merge pull request #12949 from yuwata/sd-netlink-sd-netlink-message-enter-array
sd-netlink: introduce sd_netlink_message_enter_array()
Lennart Poettering [Thu, 4 Jul 2019 13:45:43 +0000 (15:45 +0200)]
Merge pull request #12954 from keszybz/var-log-dir
/var/log-related cleanups
Yu Watanabe [Thu, 4 Jul 2019 05:56:54 +0000 (14:56 +0900)]
test: add test for sd_netlink_message_enter_array()
Zbigniew Jędrzejewski-Szmek [Thu, 4 Jul 2019 08:10:24 +0000 (10:10 +0200)]
meson: drop varlogdir variable
It was only used for exactly one thing: to substitute in the text in
/var/log/README. But it's use there was completely wrong, because the text
talks about "missing" log files from syslog, so even if we configured systemd
to log to a different directory, the "missing" log files would still be
"missing" from the old location.
Zbigniew Jędrzejewski-Szmek [Thu, 4 Jul 2019 07:59:09 +0000 (09:59 +0200)]
meson: create /var/log/journal/{,remote/} conditionally
Not everybody has those dirs in the filesystem (and they don't need to).
When creating an installation package using $DESTDIR, it is easy enough to
remove or ignore those directories, but if installing into a real root, it
is ugly to create and remove them. Let's add an option so people can skip
it if they want.
Inspired by #12930.
Yu Watanabe [Thu, 4 Jul 2019 05:31:23 +0000 (14:31 +0900)]
sd-netlink: add CTRL_ATTR_MCAST_GROUPS
Yu Watanabe [Thu, 4 Jul 2019 08:11:05 +0000 (17:11 +0900)]
sd-netlink: drop unnecessary 'else'
Yu Watanabe [Fri, 28 Jun 2019 18:30:53 +0000 (03:30 +0900)]
sd-netlink: introduce sd_netlink_message_enter_array()
Yu Watanabe [Fri, 28 Jun 2019 18:27:24 +0000 (03:27 +0900)]
sd-netlink: fix inverted log message
Yu Watanabe [Thu, 4 Jul 2019 03:36:11 +0000 (12:36 +0900)]
Merge pull request #12946 from poettering/blockdev-tweaks
three small blockdev-util.[ch] tweaks
Lennart Poettering [Wed, 29 May 2019 11:56:27 +0000 (13:56 +0200)]
varlink: allow using varlink_wait() even with a server
This call can be useful even if a server object is declared.
(Originally this was not supported, because a server typically needs to
handle multiple connections, and thus a synchronous wait on one would
starve the others out. But in some cases it might make sense to have
varlink point-to-point connections — i.e. where the server only handles
a single connection ever — and there it makes sense to synchronously
wait on the one connection).
Lennart Poettering [Tue, 28 May 2019 12:19:51 +0000 (14:19 +0200)]
json: use JSON_VARIANT_ARRAY_FOREACH() where we can
Lennart Poettering [Wed, 29 May 2019 20:10:12 +0000 (22:10 +0200)]
logind: drop old-style header from .sym file in favour of SPDX
Connor Reeder [Wed, 3 Jul 2019 18:42:45 +0000 (14:42 -0400)]
Added ACCEL_MOUNT_MATRIX for Asus Q551LN in hwdb/60-sensor.hwdb
Lennart Poettering [Tue, 21 May 2019 16:00:54 +0000 (18:00 +0200)]
blockdev-util: let us know if block_get_whole_disk() did anything
Lennart Poettering [Tue, 21 May 2019 16:00:09 +0000 (18:00 +0200)]
blockdev: filter out invalid block devices early
Lennart Poettering [Tue, 21 May 2019 16:00:32 +0000 (18:00 +0200)]
blockdev-util: propagate actual error
Lennart Poettering [Wed, 3 Jul 2019 11:04:11 +0000 (13:04 +0200)]
man: document tmpfiles.d/ user/group resolvability needs
Jan Synacek [Thu, 25 Apr 2019 10:19:16 +0000 (12:19 +0200)]
debug-generator: enable custom systemd.debug_shell tty
Zbigniew Jędrzejewski-Szmek [Tue, 2 Jul 2019 07:46:38 +0000 (09:46 +0200)]
Merge pull request #12912 from yuwata/network-move-functions
network: move functions
Yu Watanabe [Sat, 1 Jun 2019 01:31:09 +0000 (10:31 +0900)]
test-network: add udev related tests for networkctl
Zbigniew Jędrzejewski-Szmek [Mon, 1 Jul 2019 18:33:24 +0000 (20:33 +0200)]
Merge pull request #12888 from yuwata/network-udev-property-support
network,udev: add Property= setting in [Match] section
Yu Watanabe [Sat, 29 Jun 2019 20:33:53 +0000 (05:33 +0900)]
udev: accept lines which have only PROGRAM=
As PROGRAM= may cause side effect, and users may expect that.
Michael Biebl [Sun, 30 Jun 2019 23:39:35 +0000 (01:39 +0200)]
Merge pull request #12916 from yuwata/meson-drop-duplicated-line
meson: drop duplicated source
Yu Watanabe [Sat, 29 Jun 2019 17:28:42 +0000 (02:28 +0900)]
test-network: add test for Property= in [Match] section
Yu Watanabe [Sun, 30 Jun 2019 21:44:40 +0000 (06:44 +0900)]
meson: drop duplicated source
Yu Watanabe [Thu, 27 Jun 2019 13:03:02 +0000 (22:03 +0900)]
test: add tests for config_parse_match_{strv,ifnames}()
Yu Watanabe [Sat, 22 Jun 2019 19:05:51 +0000 (04:05 +0900)]
man: fix wrong udev property name
Yu Watanabe [Sat, 22 Jun 2019 16:44:13 +0000 (01:44 +0900)]
network,udev: add Property= setting in [Match] section
Closes #5665.
Yu Watanabe [Sat, 22 Jun 2019 16:08:51 +0000 (01:08 +0900)]
network,udev: make net_match_config() take sd_device
Yu Watanabe [Sat, 22 Jun 2019 18:18:52 +0000 (03:18 +0900)]
network,udev: fix multiple invert matching lines
Previously,
```
[Match]
Name=!aaa
Name=!bbb
```
does not work. This fixes the issue.
Yu Watanabe [Sat, 29 Jun 2019 17:54:35 +0000 (02:54 +0900)]
networkctl: do not show '(null)' in HW Address entry
This also fixes indentation.
Yu Watanabe [Sat, 29 Jun 2019 20:10:35 +0000 (05:10 +0900)]
network: move prototypes related to network Network bus objects to networkd-network-bus.h
Yu Watanabe [Sat, 29 Jun 2019 19:51:05 +0000 (04:51 +0900)]
Merge pull request #12910 from keszybz/udev-kvm
Fix permissions on /dev/kvm
Yu Watanabe [Sat, 29 Jun 2019 19:33:34 +0000 (04:33 +0900)]
network: move DHCP server related functions to networkd-dhcp-server.c
Yu Watanabe [Sat, 29 Jun 2019 19:09:51 +0000 (04:09 +0900)]
network: move DHCP6 related code from networkd-manager.c to networkd-dhcp6.c
Yu Watanabe [Sat, 29 Jun 2019 18:57:47 +0000 (03:57 +0900)]
network: move conf parsers and function prototypes
Yu Watanabe [Sat, 29 Jun 2019 19:10:40 +0000 (04:10 +0900)]
Merge pull request #12903 from keszybz/condition-quoting
Condition quoting
Zbigniew Jędrzejewski-Szmek [Sat, 29 Jun 2019 15:06:30 +0000 (17:06 +0200)]
test-condition: do not accidentally treat error as passing condition
condition_test returns 0, 1, or error.
Zbigniew Jędrzejewski-Szmek [Fri, 28 Jun 2019 08:58:06 +0000 (10:58 +0200)]
Treat kernel version condition as a list of quoted checks
Before only one comparison was allowed. Let's make this more flexible:
ConditionKernelVersion = ">=4.0" "<=4.5"
Fixes #12881.
This also fixes expressions like "ConditionKernelVersion=>" which would
evaluate as true.
Yu Watanabe [Thu, 27 Jun 2019 14:11:34 +0000 (23:11 +0900)]
test-execute: add test for ConditionKernelVersion= with quotation
Zbigniew Jędrzejewski-Szmek [Sat, 29 Jun 2019 14:25:52 +0000 (16:25 +0200)]
Merge pull request #12907 from yuwata/meson-default-libidn2
meson: use libidn2 and drop udev debug option
Yu Watanabe [Fri, 28 Jun 2019 22:26:02 +0000 (07:26 +0900)]
udev: fix wrong event source to set description
Zbigniew Jędrzejewski-Szmek [Sat, 29 Jun 2019 14:22:22 +0000 (16:22 +0200)]
Merge pull request #12908 from yuwata/udevadm-completion-action
udevadm: support special value 'help' for --action option
Zbigniew Jędrzejewski-Szmek [Sat, 29 Jun 2019 13:08:11 +0000 (15:08 +0200)]
udev: don't force device ownership and mode on every event
This partially reverts
25de7aa7b90c23d33ea50ada1e50c5834a414237. I don't think the
change was intended there.
The problem I'm trying to solve: for /dev/kvm we get first an ADD uevent, and
then CHANGE whenever something connects or disconnects to the character device.
The rules in 50-default-udev.rules set UID, GID, and MODE on ADD, but not on
CHANGE. When the change event happens, we would reset the ownership and
permissions.
This happens because node_permissions_apply() would (after
25de7aa7b90c23d33)
set uid=gid=0 if they weren't set by the rules.
So let's only pass uid/gid/mode to node_permissions_apply() if appropriately
configured. Also let node_permissions_apply() do the skip of uid/gid/mode if
not set, and rename "always_apply" to more closely reflect its meaning.
Zbigniew Jędrzejewski-Szmek [Sat, 29 Jun 2019 12:56:45 +0000 (14:56 +0200)]
udev: tiny fix to debug message
Yu Watanabe [Fri, 28 Jun 2019 19:08:18 +0000 (04:08 +0900)]
bash-completion: udevadm: list all possible values for --action option