1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-26 03:22:00 +03:00
Commit Graph

40731 Commits

Author SHA1 Message Date
Susant Sahani
caa8ca4286 networkd: DHCPv6 - separate DHCPv6 options from DHCPv4 options
Closes https://github.com/systemd/systemd/issues/12917
2019-07-10 16:59:29 +09:00
Evgeny Vereshchagin
f34635bcda fuzzbuzz: rename fuzz.yaml to fuzzbuzz.yaml
fuzz.yaml will stop working in a week
2019-07-10 05:11:52 +03:00
Dave Reisner
d8c72e87a0 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.
2019-07-09 10:00:13 +02:00
Yu Watanabe
593aee8f3c network: read sysctl value only once (#12990)
Follow-up for bafa964144.

When the value is changed, networkd needs to be restarted.
2019-07-09 09:56:50 +02:00
Yu Watanabe
8164e30603 util: fix sign-compare warning 2019-07-09 09:54:13 +02:00
Dan Streetman
abb9cc50af 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:
2019-07-09 14:54:34 +09:00
Evgeny Vereshchagin
869250e6b8
Merge pull request #12992 from mrc0mmand/test-functions-fixes
Various test/test-functions fixes/improvements
2019-07-09 02:27:39 +03:00
Zbigniew Jędrzejewski-Szmek
334c0979f3 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".
2019-07-09 01:25:35 +02:00
Zbigniew Jędrzejewski-Szmek
cd132992bb 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 3acc84ebd9.
2019-07-09 01:24:20 +02:00
Zbigniew Jędrzejewski-Szmek
5350df966a
Merge pull request #12972 from intelfx/cryptsetup-enable-libcryptsetup-debug
cryptsetup: properly handle libcryptsetup debug logging
2019-07-09 00:47:06 +02:00
Frantisek Sumsal
03bf413309 test: install missing dependencies for CIs 2019-07-08 21:37:16 +02:00
Frantisek Sumsal
cc469c3dfc 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`).
2019-07-08 21:11:32 +02:00
Frantisek Sumsal
71a0de36e5 test: be a little bit more verbose when installing service binaries 2019-07-08 21:10:21 +02:00
Frantisek Sumsal
3cdb93d07b 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.
2019-07-08 21:05:51 +02:00
Frantisek Sumsal
f5f8cc7aed 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
2019-07-09 02:00:14 +09:00
Zbigniew Jędrzejewski-Szmek
ab14b802b4
FUNDING: this needs to be yaml 2019-07-08 16:55:31 +02:00
Zbigniew Jędrzejewski-Szmek
3a54c53c3c Create FUNDING.yml 2019-07-08 16:02:45 +02:00
Ivan Shapovalov
ac8bb308b7 growfs: call crypt_set_debug_level() correctly, skip if not needed 2019-07-08 16:04:17 +03:00
Ivan Shapovalov
568a84048e 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.
2019-07-08 16:02:41 +03:00
Yu Watanabe
16e233d0bb
Merge pull request #12970 from ddstreet/gh12969
src/network/networkd-dhcp4.c: set prefsrc for classless or static routes
2019-07-08 21:18:04 +09:00
RussianNeuroMancer
0c9256703e Add accel mount matrix for Irbis TW90 2019-07-08 11:53:34 +02:00
Lennart Poettering
ba2fb17d8b 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.
2019-07-08 13:47:04 +09:00
Evgeny Vereshchagin
24e4b4a199 semaphore: pass allow-releaseinfo-change to apt-get
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=929248
2019-07-07 19:28:14 +03:00
Ivan Shapovalov
8c71b2cd44 cryptsetup: set libcryptsetup global log callback too 2019-07-06 13:56:19 +03:00
Ivan Shapovalov
df2452c553 basic/log: fix SYSTEMD_LOG_* parsing error messages
(likely a copy-paste gone wrong)
2019-07-06 13:47:06 +03:00
Yu Watanabe
c38d2d4d59 test-network: add tests for DHCP.UseRoutes=no with custom route settings
This adds test for b5799eeb07.

Closes #12951.
2019-07-06 08:23:10 +09:00
Yu Watanabe
4c882c16be test-network: add testcase for DHCP client with static address
Testcase for #12969.
2019-07-06 07:39:23 +09:00
Dan Streetman
ac2dce5f36 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
46b0c76e2c

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
2019-07-06 07:36:31 +09:00
Lennart Poettering
1ccbb359a1 login: move file definitions outside of the conditionalization 2019-07-05 17:55:49 +02:00
Zbigniew Jędrzejewski-Szmek
6490a017e2
Merge pull request #12964 from yuwata/network-bridge-vlan-issue-12958
network: fix BridgeVLAN issue
2019-07-05 13:58:21 +02:00
Yu Watanabe
6a54fb8f1e
Merge pull request #12963 from keszybz/analyze-timestamp
systemd-analyze dump fixup
2019-07-05 17:15:00 +09:00
Yu Watanabe
6f94379833 test-network: add tests for BridgeVLAN 2019-07-05 16:39:39 +09:00
Yu Watanabe
3a1df8c4cb network: fix issue found by UBSan 2019-07-05 16:37:34 +09:00
Yu Watanabe
412ac780ac network: fix the initial value of the counter for brvlan
Fixes #12958.
2019-07-05 16:35:11 +09:00
Yu Watanabe
fb721f084c network: re-implement parse_vid_range() 2019-07-05 16:35:06 +09:00
Yu Watanabe
7bbb43a79a network: minor coding-style update 2019-07-05 16:34:01 +09:00
Lennart Poettering
7e69d90c8d varlink: add varlink server to event loop only if there is one 2019-07-04 22:53:49 +02:00
Zbigniew Jędrzejewski-Szmek
3454129571 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.
2019-07-04 22:52:25 +02:00
Yu Watanabe
aaae57139b test-network: show debug logs of networkd 2019-07-05 02:47:42 +09:00
Lennart Poettering
e4c5d78e5f portabled: Make use of SYNTHETIC_ERRNO() 2019-07-04 19:45:23 +02:00
Lennart Poettering
b67f05dabf 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.
2019-07-05 02:31:12 +09:00
Lennart Poettering
a709a3154d 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.
2019-07-05 02:19:24 +09:00
Zbigniew Jędrzejewski-Szmek
1f65fd4926 basic/time-util: add helper function to check if timestamp is set
No functional change.
2019-07-04 19:12:47 +02:00
Philip Withnall
a9a50bd680 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>
2019-07-04 18:26:03 +02:00
Lennart Poettering
52d8bcd131
Merge pull request #12949 from yuwata/sd-netlink-sd-netlink-message-enter-array
sd-netlink: introduce sd_netlink_message_enter_array()
2019-07-04 15:46:02 +02:00
Lennart Poettering
534b8b80b7
Merge pull request #12954 from keszybz/var-log-dir
/var/log-related cleanups
2019-07-04 15:45:43 +02:00
Yu Watanabe
9104009e5e test: add test for sd_netlink_message_enter_array() 2019-07-04 17:36:09 +09:00
Zbigniew Jędrzejewski-Szmek
29c7680ec9 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.
2019-07-04 10:16:48 +02:00
Zbigniew Jędrzejewski-Szmek
6ed5ef9819 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.
2019-07-04 10:16:48 +02:00
Yu Watanabe
8fab27472b sd-netlink: add CTRL_ATTR_MCAST_GROUPS 2019-07-04 17:11:14 +09:00