Commit Graph

38304 Commits

Author SHA1 Message Date
Yu Watanabe 7e68a33b46 man: clarify the source of DefaultTimeoutStartSec= 2019-02-01 12:31:35 +01:00
Yu Watanabe 68d838f71d man: fix volume num of journalctl 2019-02-01 12:30:36 +01:00
Lennart Poettering 118dccc948 pager: improve english a bit 2019-01-31 13:37:58 +01:00
govwin 913b9ba957 Add Lenovo Yoga 500-14IBD, 80N4 GlidePoint Touchpad (#11606)
Touchpad size as listed by kernel was 102x28mm. Update changes it to 106x71mm.
User measured (actual size): 108x72mm.
2019-01-31 14:43:14 +10:00
Lennart Poettering ba7a6b8c09 More NEWS prep for v241 2019-01-30 19:26:40 +01:00
Susant Sahani 7bea7f9b57 test-network: skip erspan test if not available 2019-01-30 14:30:59 +01:00
Evgeny Vereshchagin 3fb1ea3bb4
Merge pull request #11592 from evverx/ignore-memory-leaks-in-dbus
tests: ignore memory leaks in dbus-daemon and also crash PID1 if UBSan is unhappy
2019-01-30 16:24:18 +03:00
Ronnie P. Thomas 7f700b8a27 Fixed minor typo in man/tmpfiles.d.xml 2019-01-30 07:30:27 +01:00
Evgeny Vereshchagin a19f909b5b tests: crash PID1 if UBSan is unhappy
Now that https://github.com/systemd/systemd/issues/10332 is unlikely to happen
it should be totally fine to try to crash PID1 :-)
2019-01-30 03:16:14 +01:00
Evgeny Vereshchagin d56db495de tests: ignore memory leaks in dbus-daemon
Otherwise, the test fails on Fedora 28 with
```
Jan 30 01:42:35 systemd-testsuite dbus-daemon[61]: [system] Successfully activated service 'org.freedesktop.systemd1'
Jan 30 01:42:35 systemd-testsuite systemd[61]: dbus.service: Kernel keyring access prohibited, ignoring.
Jan 30 01:42:35 systemd-testsuite systemd[61]: dbus.service: Executing: /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
Jan 30 01:42:50 systemd-testsuite dbus-daemon[61]: =================================================================
Jan 30 01:42:50 systemd-testsuite dbus-daemon[61]: ==61==ERROR: LeakSanitizer: detected memory leaks
Jan 30 01:42:50 systemd-testsuite dbus-daemon[61]: Direct leak of 72 byte(s) in 1 object(s) allocated from:
Jan 30 01:42:50 systemd-testsuite dbus-daemon[61]:     #0 0x7f21f9e29088 in __interceptor_realloc (/usr/lib64/libasan.so.5+0xef088)
Jan 30 01:42:50 systemd-testsuite dbus-daemon[61]:     #1 0x7f21f9b1b23c  (/lib64/libdbus-1.so.3+0x3323c)
Jan 30 01:42:50 systemd-testsuite dbus-daemon[61]:     #2 0x240000001b  (<unknown module>)
Jan 30 01:42:50 systemd-testsuite dbus-daemon[61]: Direct leak of 16 byte(s) in 1 object(s) allocated from:
Jan 30 01:42:50 systemd-testsuite dbus-daemon[61]:     #0 0x7f21f9e29088 in __interceptor_realloc (/usr/lib64/libasan.so.5+0xef088)
Jan 30 01:42:50 systemd-testsuite dbus-daemon[61]:     #1 0x7f21f9b1b23c  (/lib64/libdbus-1.so.3+0x3323c)
Jan 30 01:42:50 systemd-testsuite dbus-daemon[61]:     #2 0x7ffffffff  (<unknown module>)
Jan 30 01:42:50 systemd-testsuite dbus-daemon[61]: SUMMARY: AddressSanitizer: 88 byte(s) leaked in 2 allocation(s).
```

The leaks were reported and fixed in https://bugs.freedesktop.org/show_bug.cgi?id=107320.
2019-01-30 02:28:40 +01:00
Yu Watanabe 8671411668 udevd: save the result of devnum or ifindex blocker 2019-01-29 14:07:21 +01:00
Yu Watanabe baa461fc05 udevd: always block follwoing events with same devpath
Originally commented as "devices names might have changed/swapped in the meantime",
but may not. For safety, let's block the following events with same
devpath.

This may fix #6514.
2019-01-29 14:04:43 +01:00
Yu Watanabe 0bd0407efc udevd: trivial refactoring of is_device_busy() 2019-01-29 13:53:19 +01:00
Evgeny Vereshchagin 8605a4b9eb travis: switch to the "official" systemd-ci repository
Now that add-apt-repository hasn't failed for almost two days on Semaphore
it should be safe to assume that the key has been propagated properly
and the repository is ready to be used on Travis CI.
2019-01-29 11:51:20 +01:00
Lennart Poettering 92dc48ac45
Merge pull request #11540 from taro-yamada/mytest
ReFix #11128
2019-01-29 11:27:42 +01:00
Lennart Poettering f90bf549f7
Merge pull request #11569 from yuwata/first-step-11307
util-lib: warn if address is specified without prefix length
2019-01-29 11:25:55 +01:00
Yu Watanabe 0b5245a2ee test-network: set missing prefixlen 2019-01-29 07:36:35 +01:00
Yu Watanabe 0f707207b9 network: warn if Address= is specified without prefixlen
This is the first step for #11307.
2019-01-29 07:36:35 +01:00
Yu Watanabe 9e0fdc211b util: add a new mode for in_addr_prefix_from_string_auto_internal() which refuses address without prefixlen
This also drops in_addr_default_prefix_from_string(), as it is only
used by test-in-addr.
2019-01-29 07:35:17 +01:00
Taro Yamada 6cff72eb0a Add a warning about the difference in permissions between existing directories and unit settings.
To follows the intent of 30c81ce, this change does not execute chmod() and just add warnings.
2019-01-29 09:52:21 +09:00
Lennart Poettering 9066811e5a
Merge pull request #11580 from yuwata/fix-11579
network/wireguard: fix sending wireguard peers
2019-01-28 16:57:08 +01:00
Franck Bui e2c7c94ea3 units: make sure initrd-cleanup.service terminates before switching to rootfs
A follow-up for commit a8cb1dc3e0.

Commit a8cb1dc3e0 made sure that initrd-cleanup.service won't be stopped
when initrd-switch-root.target is isolated.

However even with this change, it might happen that initrd-cleanup.service
survives the switch to rootfs (since it has no ordering constraints against
initrd-switch-root.target) and is stopped right after when default.target is
isolated. This led to initrd-cleanup.service entering in failed state as it
happens when oneshot services are stopped.

This patch along with a8cb1dc3e0 should fix issue #4343.

Fixes: #4343
2019-01-28 13:41:28 +01:00
Frantisek Sumsal a1e3f0f38b test-barrier: skip the test in virtualized/containerized environments 2019-01-28 12:47:19 +01:00
Yu Watanabe 624a47694c network/wireguard: use sd_netlink_message_append_sockaddr_in{,6}() 2019-01-28 12:27:37 +01:00
Lennart Poettering 1dea095cdb
Merge pull request #11566 from poettering/alloca-assert
add a safety size assert() on most alloca() calls
2019-01-28 12:19:36 +01:00
Yu Watanabe abd48ec87f sd-netlink: introduce sd_netlink_message_append_sockaddr_in{,6}() 2019-01-28 12:19:29 +01:00
Yu Watanabe 16ab043bda test-network: add more checks in NetworkdNetDevTests.test_wireguard 2019-01-28 10:10:15 +01:00
Yu Watanabe 2301c54fa9 network/wireguard: fixes sending wireguard peer settings
This fixes a bug introduced by e1f717d4a0.

Fixes #11579.
2019-01-28 10:09:57 +01:00
Zbigniew Jędrzejewski-Szmek 00e1adf8b1 journal: avoid buffer overread when locale name is too long
We could potentially create an unterminated string and then call normal string
operations on it. Let's be more careful: first remove the suffix we ignore anyway,
then find if the string is of acceptable length, and possibly ignore it if it
is too long. The code rejects lengths above 31 bytes. Language names that are
actually used are much shorter, so this doesn't matter much.
2019-01-27 18:34:15 +01:00
Marc-Antoine Perennou d279b185c0 kernel-install: fix dracut initrd detection (240 backward compatibility) (#11570)
* kernel-install: fix initrd when called as installkernel

Running make install from the kernel runs e.g.:
installkernel 4.20.5 arch/x86/boot/bzImage System.map "/boot"

Since 0912c0b80e this would
cal 90-loaderentry.install with those arguments:
add 4.20.5 /boot/... arch/x86/boot/bzImage System.map "/boot"

The two last arguments would then be handled as the initrd files.
As System.map exists in current directory but not in /boot/...
it would get copied there, and used as initrd intead of the initrd
which has been generated by dracut.

With this change, nothing changes when kernel-install is called
directly, but when it's called as installkernel, we now pass
thos arguments to 90-loaderentry.install:
add 4.20.5 /boot/... arch/x86/boot/bzImage initrd
initrd is thus detected as the file to use for the initrd, and as it
exists, nothing is copied over and the initrd line generated is
consistent with what one would expect

* kernel-install: fix dracut initrd detection when called directly

This brings back the systemd 240 behaviour when called directly too

* kernel-install: unify initrd fallback

* kernel-install: move initrd fallback handling to 90-loaderentry.install

* kernel-install: move initrd fallback just before creating loader entry
2019-01-27 17:32:21 +01:00
Zbigniew Jędrzejewski-Szmek cd8c98d7a7 shared/dissect-image: make sure that we don't truncate device name
gcc-9 complains that the string may be truncated when written into the output
structure. This shouldn't happen, but if it did, in principle we could remove a
different structure (with a matching name prefix). Let's just refuse the
operation if the name doesn't fit.
2019-01-27 09:35:36 +01:00
Taro Yamada ff9e7900c0 Revert "Fixes #11128"
This reverts commit 0bf05f0122 because it breaks 30c81ce.
Please see #11540.
2019-01-27 13:43:30 +09:00
Zbigniew Jędrzejewski-Szmek ccfe70a6ee
Merge pull request #11513 from poettering/cryptsetup-msg
improve cryptsetup messaging
2019-01-26 16:43:20 +01:00
Lennart Poettering 6e9417f5b4 tree-wide: use newa() instead of alloca() wherever we can
Typesafety is nice. And this way we can take benefit of the new size
assert() the previous commit added.
2019-01-26 16:17:04 +01:00
Lennart Poettering 4aee28c67b alloc-util: whenever any of our alloca() wrappers is used to allocate overly large memory blocks, hit an assert()
Of course, this should never happen, but let's better be safe than
sorry, and abort rather than continue when a too large memory block is
allocated, simply asa safety precaution.

An early abort is better than continuing with a likely memory corruption
later.
2019-01-26 16:17:04 +01:00
Lennart Poettering 7c45deb20d
Merge pull request #11460 from yuwata/fix-11458
network: update address when static address was already configured by DHCP
2019-01-26 15:41:06 +01:00
Zbigniew Jędrzejewski-Szmek 064605ef56 build-sys: bump package/library versions
We added sd_bus_close_unref().
2019-01-26 15:02:38 +01:00
Lennart Poettering a90d944359
Merge pull request #11562 from yuwata/fix-11558
core/mount: do not add Before=local-fs.target or remote-fs.target if nofail mount option is set
2019-01-26 14:46:48 +01:00
Lennart Poettering f2500feadf
Merge pull request #11466 from keszybz/fix-loop-remounts
pid1: fix cleanup of stale implicit deps based on /proc/self/mountinfo
2019-01-26 14:42:02 +01:00
Zbigniew Jędrzejewski-Szmek c52c2dc64f pid1: fix cleanup of stale implicit deps based on /proc/self/mountinfo
The problem was introduced in a37422045fbb68ad68f734e5dc00e0a5b1759773:
we have a unit which has a fragment, and when we'd update it based on
/proc/self/mountinfo, we'd say that e.g. What=/dev/loop8 has origin-fragment.
This commit changes two things:
- origin-fragment is changed to origin-mountinfo-implicit
- when we stop a unit, mountinfo information is flushed and all deps based
  on it are dropped.

The second step is important, because when we restart the unit, we want to
notice that we have "fresh" mountinfo information. We could keep the old info
around and solve this in a different way, but keeping stale information seems
inelegant.

Fixes #11342.
2019-01-26 14:40:50 +01:00
Lennart Poettering 67216ef8f2
Merge pull request #11530 from keszybz/journal-cache-trimming
Journal cache trimming
2019-01-26 13:55:55 +01:00
Lennart Poettering b3f259d056
Merge pull request #11545 from xnox/ppc64el
test-functions: fixup PPC64 testing
2019-01-26 13:55:32 +01:00
Lennart Poettering e4bbc5fb74 units: drop conditionalization of systemd-tmpfiles-setup-dev.service
Currently, tmpfiles runs in two separate services at boot. /dev is
populated by systemd-tmpfiles-setup-dev.service and everything else by
systemd-tmpfiles-setup.service. The former was so far conditionalized by
CAP_SYS_MODULES. The reasoning was that the primary purpose of
populating /dev was to create device nodes based on the static device
node info exported in kernel modules through MODALIAS. And without the
privs to load kernel modules doing so is unnecessary. That thinking is
incomplete however, as there might be reason to create stuff in /dev
outside of the static modalias usecase. Thus, let's drop the
conditionalization to ensure that tmpfiles.d rules are always executed
at least once under all conditions.

Fixes: #11544
2019-01-26 13:55:18 +01:00
Lennart Poettering 2949ff2691 nspawn: ignore SIGPIPE for nspawn itself
Let's not abort due to a dead stdout.

Fixes: #11533
2019-01-26 13:54:44 +01:00
Michal Sekletar eb1ec489ee process-util: don't use overly large buffer to store process command line
Allocate new string as a return value and free our "scratch pad"
buffer that is potentially much larger than needed (up to
_SC_ARG_MAX).

Fixes #11502
2019-01-26 13:54:29 +01:00
Yu Watanabe 321cd1c17c man: update DefaultDependency= in systemd.mount(5)
Follow-up for d54bab90e6 and the
previous commit.
2019-01-26 13:06:16 +01:00
Zbigniew Jędrzejewski-Szmek 91714a7f42 journald: periodically drop cache for all dead PIDs
In normal use, this allow us to drop dead entries from the cache and reduces
the cache size so that we don't evict entries unnecessarily. The time limit is
there mostly to serve as a guard against malicious logging from many different
PIDs.
2019-01-26 12:43:27 +01:00
Zbigniew Jędrzejewski-Szmek b12a480829 journal: limit the number of entries in the cache based on available memory
This is far from perfect, but should give mostly reasonable values. My
assumption is that if somebody has a few hundred MB of memory, they are
unlikely to have thousands of processes logging. A hundred would already be a
lot. So let's scale the cache size propritionally to the total memory size,
with clamping on both ends.

The formula gives 64 cache entries for each GB of RAM.
2019-01-26 12:42:52 +01:00
Zbigniew Jędrzejewski-Szmek ef21b3b5bf basic/prioq: add prioq_peek_item() 2019-01-26 12:42:46 +01:00
zsergeant77 c11cd775db Update 60-sensor.hwdb
Added mount matrix for Digma CITI E203 hybrid
2019-01-26 12:02:45 +01:00