1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-02-01 05:47:04 +03:00

41854 Commits

Author SHA1 Message Date
Denis Pronin
1a4d6e5c6b Support compiling with clang and gnu11 standard
Signed-off-by: Denis Pronin <dannftk@yandex.ru>
(cherry picked from commit 36e0d89a88c51ba879a2d7e2f90ea9b38333e2c0)
(cherry picked from commit 9251cac7b2969691fbf50d77e8c61052c1f7e4d5)
(cherry picked from commit 16cac70094259ba0602b4cb103f02f04d2d9b304)
2020-03-26 14:31:35 +01:00
bemarek
de5a33367b Typo fix
(cherry picked from commit 1cee1c52833fb6e3829e510109404852a17e5bdd)
(cherry picked from commit ffccc15f725fe8d9d39a44978168cc483820d750)
(cherry picked from commit 1ea52d91c80b9012f4f76e660122e04ef3f86bc8)
2020-03-26 14:31:27 +01:00
James T. Lee
fb95466dc8 boot: Ensure ARM UEFI binary does not contain FP/SIMD instructions
ARM toolchains will sometimes optimize otherwise floating-point-free
code with floating point and SIMD instructions.  This was happening with
systemd-bootarm.efi and it was causing U-Boot to crash and reset the
CPU.  U-Boot does not support the ARM VFP floating point coprocessor,
which is an optional piece of hardware anyway [1].

Ensure the compiler does not generate FP/SIMD instructions by supplying
the `-mgeneral-regs-only` option when building for ARM [2].

The other option you often see to solve these problems is
`-msoft-float`, but that changes the ABI and prevents linking with
libgnuefi.

[1] https://lists.denx.de/pipermail/u-boot/2011-February/087736.html
[2] https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html#index-mgeneral-regs-only-1

(cherry picked from commit 1ad6056239b70ce69ea70108cf4e49a05a9c2a1d)
(cherry picked from commit 73678d2307042a45ceb3d7fe2fd182f6f6ec3f2d)
(cherry picked from commit 869614a5515fd21c7c639cdbf5d96889f4316463)
2020-03-26 14:31:21 +01:00
Zbigniew Jędrzejewski-Szmek
f8dd0f2f15 Revert "Support Plugable UD-PRO8 dock"
This reverts commit 98c03090274a067806090e2974fd2091f8206457.

See https://github.com/systemd/systemd/issues/14822.
v243.7
2020-02-07 16:51:14 +01:00
Zbigniew Jędrzejewski-Szmek
1a5428c2ab hibernate-resume-generator: wait "infinitely" for the resume device
This makes changes similar to the parent commit, but for hibernate-resume-generator.
If resume= is specified on the kernel command line, we'll set JobRunningTimeoutSec=0
for the device. This matches what we do for the root device.

In practice, other timeouts will take effect. For example dracut tries (and
fails :[ ) to start dracut-emergency.service after some time.

Fixes #7242, https://bugzilla.redhat.com/show_bug.cgi?id=1705522.

(cherry picked from commit ff757c9d294153a26a9dd2d9817d1985656f3002)
(cherry picked from commit bb598b56eb3cef6dc07b260dc205c67aa11b1196)
2020-02-05 20:34:52 +01:00
Zbigniew Jędrzejewski-Szmek
eb3148c468 hwdb: update to v245-rc1
The change in 419a8a2dabb4184080d06f583f9539780ec10ec6 is not included.
Addition of XKB_FIXED_MODEL is also excluded.
v243.6
2020-02-05 18:05:43 +01:00
Zbigniew Jędrzejewski-Szmek
f14fa558ae Fix typo in function name
(cherry picked from commit bc130b6858327b382b07b3985cf48e2aa9016b2d)
(cherry picked from commit b4eb8848240c3540180e4768216a0b884a5ed783)
2020-02-05 17:44:05 +01:00
Lennart Poettering
fb21e13e8e polkit: when authorizing via PK let's re-resolve callback/userdata instead of caching it
Previously, when doing an async PK query we'd store the original
callback/userdata pair and call it again after the PK request is
complete. This is problematic, since PK queries might be slow and in the
meantime the userdata might be released and re-acquired. Let's avoid
this by always traversing through the message handlers so that we always
re-resolve the callback and userdata pair and thus can be sure it's
up-to-date and properly valid.

(cherry picked from commit 637486261528e8aa3da9f26a4487dc254f4b7abb)
(cherry picked from commit e2d4cb9843c50eff76e9104fec6b448c0d7c8814)
2020-02-05 17:43:10 +01:00
Lennart Poettering
2e504c92d1 sd-bus: introduce API for re-enqueuing incoming messages
When authorizing via PolicyKit we want to process incoming method calls
twice: once to process and figure out that we need PK authentication,
and a second time after we aquired PK authentication to actually execute
the operation. With this new call sd_bus_enqueue_for_read() we have a
way to put an incoming message back into the read queue for this
purpose.

This might have other uses too, for example debugging.

(cherry picked from commit 1068447e6954dc6ce52f099ed174c442cb89ed54)

zjs: patch modified to not make the function public
(cherry picked from commit 83bfc0d8dd026814d23e3fdfa46806394f775526)
2020-02-05 17:42:42 +01:00
Lennart Poettering
4d80c8f158 polkit: use structured initialization
(cherry picked from commit f4425c72c7395ec93ae00052916a66e2f60f200b)
(cherry picked from commit 5926f9f1723fd753a0c524ed96a13538c851395e)
2020-02-05 17:42:17 +01:00
Lennart Poettering
54791aff01 polkit: on async pk requests, re-validate action/details
When we do an async pk request, let's store which action/details we used
for the original request, and when we are called for the second time,
let's compare. If the action/details changed, let's not allow the access
to go through.

(cherry picked from commit 7f56982289275ce84e20f0554475864953e6aaab)
(cherry picked from commit 0697d0d972c8d91395eb539a8e87e4aec8b37b75)
2020-02-05 17:41:52 +01:00
Lennart Poettering
81532beddc polkit: reuse some common bus message appending code
(cherry picked from commit 95f82ae9d774f3508ce89dcbdd0714ef7385df59)
(cherry picked from commit 2589995acdb297a073270b54d8fff54b98fa57e9)
2020-02-05 17:40:45 +01:00
Lennart Poettering
4441844d58 bus-polkit: rename return error parameter to ret_error
(cherry picked from commit 773b1a7916bfce3aa2a21ecf534d475032e8528e)
(cherry picked from commit 5b2442d5c3ec1c86a3a8d1c1abe3234a570ba5e6)
2020-02-05 17:40:30 +01:00
Lennart Poettering
31a1d569db shared: split out polkit stuff from bus-util.c → bus-polkit.c
It's enough, complex stuff to warrant its own source file.

No other changes, just splitting out.

(cherry picked from commit 269e4d2d6b75329ae39a71ebe2c14500e03cda95)
(cherry picked from commit 0a19ff7004e4a567566a0a7be6b050cf34c0bfe5)
2020-02-05 17:40:16 +01:00
Frantisek Sumsal
560eb5babf test: adapt to the new capsh format
Since libcap v2.29 the format of cap_to_text() has been changed which
makes certain `test-execute` subtest fail. Let's remove the offending
part of the output (dropped capabilities) to make it compatible with
both the old and the new libcap.

(cherry picked from commit 9569e385036c05c0bf9fbccdbf3d131161398e2e)
(cherry picked from commit 1325dfb5778dedd3ca5274d3383e7c27121fa60a)
2020-02-05 17:37:02 +01:00
Zbigniew Jędrzejewski-Szmek
275b266bde meson: update efi path detection to gnu-efi-3.0.11
Fixes systemd build in Fedora rawhide.

The old ldsdir option is not useful, because both the directory and the
file name changed. Let's remove the option and try to autodetect the file
name. If this turns out to be not enough, a new option to simply specify
the full path to the file can be added.

F31:
         efi arch:                          x86_64
         EFI machine type:                  x64
         EFI CC                             ccache cc
         EFI lds:                           /usr/lib64/gnuefi/elf_x64_efi.lds
         EFI crt0:                          /usr/lib64/gnuefi/crt0-efi-x64.o
         EFI include directory:             /usr/include/efi
F32:
         efi arch:                          x86_64
         EFI machine type:                  x64
         EFI CC                             ccache cc
         EFI lds:                           /usr/lib/gnuefi/x64/efi.lds
         EFI crt0:                          /usr/lib/gnuefi/x64/crt0.o
         EFI include directory:             /usr/include/efi
(cherry picked from commit ce4121c6ff92c1c368874bd451b73fa9b1ddec4a)
(cherry picked from commit 3538fafb471478453ca80f6ebd8b4e980909f4cf)
2020-02-05 17:36:06 +01:00
Zbigniew Jędrzejewski-Szmek
9239154545 presets: "disable" all passive targets by default
Officially we default to a "enable *", even though pretty much everybody
overrides this with "disable *". We have a bunch of targets and services which
should not be enabled by default. In case the default policy is not overriden,
our passive units would be enabled by presets, which is generally not useful at
all. So let's explicitly mark them as disabled.

Note that this effectively changes very little. E.g. on Fedora, all the units
listed in this patch were "disabled" already.

Fixes #14648.

(cherry picked from commit 61c3e2c8bfc28cea5b52d8643fac3d85f4c571d2)
(cherry picked from commit 3034855a5b62a0f9174c80ec500f9d1b9fc05238)
2020-02-05 17:36:02 +01:00
Zbigniew Jędrzejewski-Szmek
a827c41851 shared/sysctl-util: normalize repeated slashes or dots to a single value
We use those strings as hash keys. While writing "a...b" looks strange,
"a///b" does not look so strange. Both syntaxes would actually result in the
value being correctly written to the file, but they would confuse our
de-deplication over keys. So let's normalize. Output also becomes nicer.

Add test.

(cherry picked from commit f3b136a4847a0993e2dc1197779160dca4da6dac)
(cherry picked from commit c2e304681929fea79ce8e9c5a1e00cd2f293a72d)
2020-02-05 17:35:59 +01:00
Yu Watanabe
fb1bfd6804 dhcp6: do not use T1 and T2 longer than one provided by the lease
Fixes #12623.

(cherry picked from commit 9de8a4259eaebf4635142474e016b90ce5be5181)
(cherry picked from commit 6f4364046f90430aeede4789f016ae1644a292bf)
2020-02-05 17:35:55 +01:00
Yu Watanabe
ca43a515c6 network: fix implicit type conversion warning by GCC-10
Fixes part of #14691.

(cherry picked from commit a44956c94a93fe34b5398ed9aefcf0fc705d4fa6)
(cherry picked from commit 0ed6cda28dffc19dd3f6e08d3f16e4135de253b5)
2020-02-05 17:35:52 +01:00
Yu Watanabe
421eca7edf bootspec: parse random-seed-mode line in loader.conf
Fixes #14657.

(cherry picked from commit fe5a698f7646735335a97cc429ebe5d79f67fb70)
(cherry picked from commit f6a5c02d26b1687bdc34ed595c64b7c7c24b6525)
2020-02-05 17:35:47 +01:00
Yu Watanabe
34e21fc6de sd-boot: fix typo
Fixes #14657.

(cherry picked from commit a14c18ba7b4e85f34bd48c5a778ea5eafe5c8688)
(cherry picked from commit ddc5dca8a73b6c4317b8540b388116cd63b0697f)
2020-02-05 17:35:42 +01:00
dann frazier
df7b3a05c9 test: Synchronize journal before reading from it
There's a race condition in the sysuser test where it may try to read
entries from the journal before they are available. Fix it by adding a
`journalctl --sync` call.

BugLink: https://bugs.launchpad.net/bugs/1776654
(cherry picked from commit 37b9966e2525790843ab302a5b8009853a7905a0)
(cherry picked from commit 2bbbe9ae41ab7037555ceb18f457ba84fa7241ba)
2020-02-05 17:35:38 +01:00
sangelovic
9326efee71 sd-bus: fix introspection bug in signal parameter names
(cherry picked from commit 58abbbcc6bcedc4eebd1f5c7733cd41518e1f2e3)
(cherry picked from commit 072485d661d73e8834dc667deea2c5aaa6527977)
2020-02-05 17:35:35 +01:00
Susant Sahani
7bbdc56aaf efi: fix build.
```
ninja -C build
ninja: Entering directory `build'
[29/101] Generating systemd_boot.so with a custom command.
FAILED: src/boot/efi/systemd_boot.so
/usr/bin/ld -o src/boot/efi/systemd_boot.so -T /usr/lib64/gnuefi/elf_x64_efi.lds -shared -Bsymbolic -nostdlib -znocombreloc -L /usr/lib64 /usr/lib64/gnuefi/crt0-efi-x64.o src/boot/efi/disk.c.o src/boot/efi/graphics.c.o src/boot/efi/measure.c.o src/boot/efi/pe.c.o src/boot/efi/util.c.o src/boot/efi/boot.c.o src/boot/efi/console.c.o src/boot/efi/crc32.c.o src/boot/efi/random-seed.c.o src/boot/efi/sha256.c.o src/boot/efi/shim.c.o -lefi -lgnuefi /usr/lib/gcc/x86_64-redhat-linux/10/libgcc.a
/usr/bin/ld: src/boot/efi/graphics.c.o:/home/sus/tt/systemd/build/../src/boot/efi/util.h:58: multiple definition of `loader_guid'; src/boot/efi/disk.c.o:/home/sus/tt/systemd/build/../src/boot/efi/util.h:58: first defined here
/usr/bin/ld: src/boot/efi/pe.c.o:/home/sus/tt/systemd/build/../src/boot/efi/util.h:58: multiple definition of `loader_guid'; src/boot/efi/disk.c.o:/home/sus/tt/systemd/build/../src/boot/efi/util.h:58: first defined here
/usr/bin/ld: src/boot/efi/util.c.o:/home/sus/tt/systemd/build/../src/boot/efi/util.h:58: multiple definition of `loader_guid'; src/boot/efi/disk.c.o:/home/sus/tt/systemd/build/../src/boot/efi/util.h:58: first defined here
/usr/bin/ld: src/boot/efi/boot.c.o:/home/sus/tt/systemd/build/../src/boot/efi/util.h:58: multiple definition of `loader_guid'; src/boot/efi/disk.c.o:/home/sus/tt/systemd/build/../src/boot/efi/util.h:58: first defined here
/usr/bin/ld: src/boot/efi/console.c.o:/home/sus/tt/systemd/build/../src/boot/efi/util.h:58: multiple definition of `loader_guid'; src/boot/efi/disk.c.o:/home/sus/tt/systemd/build/../src/boot/efi/util.h:58: first defined here
/usr/bin/ld: src/boot/efi/random-seed.c.o:/home/sus/tt/systemd/build/../src/boot/efi/util.h:58: multiple definition of `loader_guid'; src/boot/efi/disk.c.o:/home/sus/tt/systemd/build/../src/boot/efi/util.h:58: first defined here
/usr/bin/ld: src/boot/efi/shim.c.o:/home/sus/tt/systemd/build/../src/boot/efi/util.h:58: multiple definition of `loader_guid'; src/boot/efi/disk.c.o:/home/sus/tt/systemd/build/../src/boot/efi/util.h:58: first defined here
[31/101] Generating stub.c.o with a custom command.
ninja: build stopped: subcommand failed.
make: *** [Makefile:2: all] Error 1

```

(cherry picked from commit 8bdda551dab5579a14db1d66f34356d45d5cda16)
(cherry picked from commit 80af3cf5e36b256a8eb9fdadc82c81fb3a11c189)
2020-02-05 17:35:30 +01:00
Lennart Poettering
486f8ca365 generator: order growfs for the root fs after systemd-remount-fs
Fixes: #14603
(cherry picked from commit 18e6e8635f06ac8d935ed5494ea65c6dac6af90f)
(cherry picked from commit d7ede1ade56426db83523523e473ed52133c39af)
2020-02-05 17:35:26 +01:00
Lennart Poettering
56d442e29d loginctl: use /org/freedesktop/login1/session/auto when "lock-session" is called without argument
This way we'll use the "display" session automatically, and that makes
the call work when invoked from user@.service.

Fixes: #13614
(cherry picked from commit dc084399fad28cc98e7bcdb9074141c97e863bee)
(cherry picked from commit e9904998213dcb4d5f268f3e8b1390299a1100f0)
2020-02-05 17:35:20 +01:00
Antonio Russo
6ed1152282 Documentation update for x-systemd.{before,after}
A minor clarification in the manual page is made.

Signed-off-by: Antonio Russo <antonio.e.russo@gmail.com>
(cherry picked from commit 81248e7f3e83a24cbbc8d2a09a01abf55e81bcda)
(cherry picked from commit 82dd4caf014c97eb9d7ab9da2841f7866e91bd98)
2020-02-05 17:35:09 +01:00
Andreas Rammhold
dba3efa34a man: fix typo in systemd.netdev Xfrm example
The first section header in that example should probably be `[NetDev]` and not `[Xfrm]`.

(cherry picked from commit a15e1a5df0c943ec5414014e54719bd1259fd00a)
(cherry picked from commit a60459764d9d4a3a7a32332768d9dbfb9f311dfc)
2020-02-05 17:35:05 +01:00
Lennart Poettering
6f9a8621d8 timesyncd: log louder when we refuse a server due to root distance
This is something people should know about, since it's caused by
misconfiguration.

Fixes: #13912
(cherry picked from commit ce96c9cb1a8f81ff4bbc40f5a98d003d6ffacb57)
(cherry picked from commit fc053e2dfb3f094f71580a2647c029f1976445d3)
2020-02-05 17:35:02 +01:00
Lennart Poettering
0637255d3b resolved: drop DNSSEC root key that is not valid anymore
I guess we can drop this now, the key is no longer valid until
2019-01-11, hence there's no point in still including it in our trust
anchor.

(cherry picked from commit f1f20764f9e52d6825867b2852206ed6cfcabbb9)
(cherry picked from commit af0e630693fa9268124d0f8d0e71bbe069994c1f)
2020-02-05 17:34:57 +01:00
Lennart Poettering
9a135baa40 journal: don't use startswith() on something that is not a NUL-terminated string
Otherwise we might access memory coming after it that is not valid or
allocated.

Fixes: #14114
(cherry picked from commit e0567bc8adfe027052b78b40efb57d543924f138)
(cherry picked from commit ae59f1666ca62b94355cc6d126e8fcf67f0715ca)
2020-02-05 17:34:53 +01:00
Lennart Poettering
1ff3972a0f test: add test for https://github.com/systemd/systemd/issues/14560
(cherry picked from commit e56a8790a0bf9021d693daef037cd6af85badf0d)
(cherry picked from commit 536ef6d72bc6cd76f3aff02d3bbbd17810216cce)
2020-02-05 17:34:45 +01:00
Lennart Poettering
cac79b606b core: make sure StandardInput=file: doesn't get dup'ed to stdout/stderr by default
Fixes: #14560
(cherry picked from commit 3b7f79dc9fc5557074ebe4a3b060e8dcf8cdcc0f)
(cherry picked from commit b78fe3c1b1a81435248deaffe7ee4b594b55b64b)
2020-02-05 17:31:48 +01:00
Sascha Dewald
906ba9a67d pkgconf: add full generator paths
(cherry picked from commit fc57f105d9e2b2e9e95bb739d23fa7711b5fa4b3)
(cherry picked from commit a1561a08f2d5af9ebc68916ce0cb430091a64bce)
2020-02-05 17:31:48 +01:00
Lennart Poettering
01b93e2c68 tree-wide: we forgot to destroy some bus errors
(cherry picked from commit 7e284b054ec599012f0dad6a745f6b52eba87853)
(cherry picked from commit e5f2d11489ec4852f1ad45a1271f502d20602126)
2020-02-05 17:31:48 +01:00
Lennart Poettering
5c9455657e mount: make checks on perpetual mount units more lax
We don#t really care where perpetual mounts are mounted from, since they
have to exist since before we run anyway.

(cherry picked from commit 0879fbd6fedc2f813aebcb1a4eba005a99525bde)
(cherry picked from commit ea67fd42067b0c4fa9ac7e74b646e3790eccfb82)
2020-02-05 17:31:47 +01:00
Lennart Poettering
28c58beca1 core: never allow perpetual units to be masked
Fixes: #14550
(cherry picked from commit 88414eed6f45f738ae765d9f72d67c6dc5a51950)
(cherry picked from commit 2f23c648bce479ed275b8f337e399880b5795711)
2020-02-05 17:31:47 +01:00
Wieland Hoffmann
d3b044b3e7 typo: "May modify to" -> "May modify"
(cherry picked from commit 287cf2d802263c909553689869b2146c67bb765f)
(cherry picked from commit 9ba11dffb09a7f4b63be8a5970fb51d600b53087)
2020-02-05 17:31:47 +01:00
Zbigniew Jędrzejewski-Szmek
fd378d3d3c sysctl: downgrade message when we have no permission
We need to run sysctl also in containers, because the network
subtree is namespaces and may legitimately be writable. But logging
all "errors" at notice level creates unwanted noise.

Also downgrade message about missing sysctls to log_info. This might also be
relatively common when configuration is targeted at different kernel
versions. With log_debug it'll still end up in the logs, but isn't really worth
of "notice" most of the time.

https://bugzilla.redhat.com/show_bug.cgi?id=1609806
(cherry picked from commit 32458cc9687c1b60ff0f22c0e71da93ce78b1534)
(cherry picked from commit 4c2d72b53091ed8d8e362dca052e5b9fa8325d96)
2020-02-05 17:31:45 +01:00
Luca Boccassi
db4fbf5c61 Clarify journald.conf MaxLevelStore documentation
'stored on disk' gives the impression that this option affects only
permanent storage, even though it affects everything the journal
records, regardless of the storage type.
Use 'stored in the journal' to avoid confusion.

(cherry picked from commit c97ae2b29036af29480ee506a072525917f5d41f)
(cherry picked from commit c001a285a3a2edfd344756e636f18f226fc291c4)
2020-02-05 17:28:26 +01:00
Lennart Poettering
c8365f71c0 logind: refuse overriding idle hint on tty sessions
Previously we'd allow marking TTY sessions as idle, but when the user
tried to unmark it as idle again it we'd just revert to automatic TTY
atime idle detection, thus making it impossible to mark the session as
non-idle, unless its TTY is atime-touched all the time. But of course,
marking a session as idle is pretty much fatal if you never can mark it
as non-idle again.

This change is triggred by bug reports such as this:

https://github.com/systemd/systemd/issues/14053

With this patch we will now output a clean, clear error message if a
client tries to manipulate the idle state of a non-graphical session.
This means we now have clear rules: "manual" idle logic for graphical
sessions, and TTY based ones for all others that have a TTY of some
form.

I considered allowing the idle state to be overriden both ways for tty
sessions but that's problematic: for sessions that are temporarily
upgraded from tty to graphical and thus suddenly want to manage their
own idle state we'd need to a way to detect when the upgrade goes away
and thus we should revert to old behaviour. Without reverting to the
previous TTY idle auto-magic we'd otherwise be stuck in an eternally
idle or eternally non-idle state, with really bad effects in case
auto-suspend is used. Thus, let's instead generate a proper error
message, saying clearly we don't support it.

(Also includes some other fixes and clean-ups in related code)

Closes: #14053
(cherry picked from commit be2bb14f00441d9e4a26f94834518db3829e83ed)
(cherry picked from commit 45d52c7615fdc3aefb97a13a8d8f4aa90ad7205e)
2020-02-05 17:28:13 +01:00
Lennart Poettering
cd91f567b6 cgroup: update only siblings that got realized once
Fixes: #14475
Replaces: #14554
(cherry picked from commit e1e98911a818ad3b46c6a1c26d759df590bef476)
(cherry picked from commit b1a0be45b4ee20a2ca4426ff6a9d9fce0664960c)
2020-02-05 17:28:03 +01:00
Jun'ichi Nomura
c672dcd212 mount: mark an existing "mounting" unit from /proc/self/mountinfo as "just_mounted"
When starting a mount unit, systemd invokes mount command and moves the
unit's internal state to "mounting".  Then it watches for updates of
/proc/self/mountinfo.  When the expected mount entry newly appears in
mountinfo, the unit internal state is changed to "mounting-done".
Finally, when systemd finds the mount command has finished, it checks
whether the unit internal state is "mounting-done" and changes the state
to "mounted".
If the state was not "mounting-done" in the last step though mount command
was successfully finished, the unit is marked as "failed" with following
log messages:
  Mount process finished, but there is no mount.
  Failed with result 'protocol'.

If daemon-reload is done in parallel with starting mount unit, it is
possible that things happen in following order and result in above failure.
  1. the mount unit state changes to "mounting"
  2. daemon-reload saves the unit state
  3. kernel completes the mount and /proc/self/mountinfo is updated
  4. daemon-reload restores the saved unit state, that is "mounting"
  5. systemd notices the mount command has finished but the unit state
     is still "mounting" though it should be "mounting-done"

mount_setup_existing_unit() should take into account that MOUNT_MOUNTING
is transitional state and set MOUNT_PROC_JUST_MOUNTED flag if the unit
comes from /proc/self/mountinfo so that mount_process_proc_self_mountinfo()
later can make state transition from "mounting" to "mounting-done".

Fixes: #10872
(cherry picked from commit 1d086a6e59729635396204fc05234f1d3caa0847)
(cherry picked from commit e6d694254fe115cc04852732172959998e051b87)
2020-02-05 17:27:48 +01:00
Timo Schlüßler
a592a40564 journalctl: Correctly handle combination of --reverse and --lines (fixes #1596)
(cherry picked from commit 23b392166388003530fef02ac5758c91315a707b)
(cherry picked from commit d8fd38769c36ef9b2e5e122c345bca05ef2be88f)
2020-02-05 17:27:41 +01:00
Timo Schlüßler
0aa144ab1d journalctl: Correctly handle --show-cursor in combination with --until or --since and --reverse
(cherry picked from commit 3ac9cac7f7a34c3713b49841ee75ef9c9357e7e4)
(cherry picked from commit cd19bd31d8081f4a97201a20cdaee1fb1d3fafdd)
2020-02-05 17:27:41 +01:00
Lennart Poettering
3b803a5e66 core: fix re-realization of cgroup siblings
This is a fix-up for eef85c4a3f8054d29383a176f6cebd1ef3a15b9a which
broke this.

Tracked down by @w-simon

Fixes: #14453
(cherry picked from commit 65f6b6bdcb500c576674b5838e4cc4c35e18bfde)
(cherry picked from commit 1320aa92dc0adc0d08662684b157eb2e3d985ac0)
2020-02-05 17:27:18 +01:00
Lennart Poettering
7549dd40fc core: propagate service state to socket in more load states
It makes sense to filter state changes for some load states that
shouldn't happen, but the common cases should be accepted, because they
might happen during runtime when "systemctl daemon-reload" is issued and
unit files changed state in between. Otherwise we lose events.

Fixes: #4708
(cherry picked from commit 4c2ef3276735ad9f7fccf33f5bdcbe7d8751e7ec)
(cherry picked from commit 14164ec6bc7779201e6ea16c8e8ccff4f98bb4cd)
2020-02-05 17:27:08 +01:00
HATAYAMA Daisuke
af6df343b2 man: describe "symlink" and "systemctl link" explicitly in UNIT FILE LOAD PATH
There are sometimes users who put unit files in a location that is inaccessible
when systemd starts although they are not found and thus not started because
the corresponding mount units have not activated yet.

There is already a warning for such issue in man 8 systemctl:

     link PATH...
         ...<snip>...
         The file system where
         the linked unit files are located must be accessible
         when systemd is started (e.g. anything underneath /home
         or /var is not allowed, unless those directories are
         located on the root file system).

However, it looks that it's difficult to find the warning because introductory
users typically doesn't know systemctl link.

Although there is a description in UNIT FILE LOAD PATH pointing to systemctl
link, symlink is now not explicitly mentioned there and thus users doesn't
easily get aware of they should read it.

To deal with this, let's describe "symlink" and "systemctl link" more
explicitly in UNIT FILE LOAD PATH.

(cherry picked from commit b63c88b6271804e4770a14d94c66210e0c8063d7)
(cherry picked from commit c22bf6b31a454e51c707dcd0e6993f09ea6758db)
2020-02-05 17:27:02 +01:00
Lennart Poettering
a3c1ce25a7 core: be more restrictive on the dependency types we allow to be created transiently
We should allow the ones that the [Unit] section of regular unit files
may accet, but no other, in particular not the internal deps we
synthesize as reverse of explicitly configured ones, such was WantedBy=.

Fixes: #14251
(cherry picked from commit 404308486aa285c67c5af4c8e7d6be393ce5a3c7)
(cherry picked from commit 26f3a534f1abba5284b1cc97eadb81ece960eb1a)
2020-02-05 17:26:56 +01:00