Michael Scherer [Sat, 15 Aug 2020 16:12:02 +0000 (18:12 +0200)]
Newer Glibc use faccessat2 to implement faccessat
cf https://repo.or.cz/glibc.git/commit/
3d3ab573a5f3071992cbc4f57d50d1d29d55bde2
This cause breakage on Fedora Rawhide: https://bugzilla.redhat.com/show_bug.cgi?id=
1869030
(cherry picked from commit
bcf08acbffdee0d6360d3c31d268e73d0623e5dc)
(cherry picked from commit
0d026c9b0d2fbf62d0a69aa1715ccb4f7c6dc2fe)
(cherry picked from commit
458129fa078ef0128f0cc255293139efbe032417)
(cherry picked from commit
da1eb548fbb674d9d11fb6137956fec2b155a066)
Kamil Dudka [Wed, 5 Aug 2020 21:53:40 +0000 (23:53 +0200)]
_sd-common.h: avoid parsing errors with Coverity
The commit
1070d271fa8fa553d57dd5f74dd1e3f60732d0b9 which was supposed
too fix this does not seem to take effect any more. We get again 34%
compilation success rate while scanning systemd itself. Moreover, the
installed header file breaks compilation of programs that include it:
"/usr/include/systemd/_sd-common.h", line 23: error #35: #error directive: "Do
not include _sd-common.h directly; it is a private header."
# error "Do not include _sd-common.h directly; it is a private header."
^
(cherry picked from commit
4191b3282afbca9f1ef333f91bb6566c374da1fe)
(cherry picked from commit
5aec8fe54e47dbffc9ed705e4211f935bdca1550)
(cherry picked from commit
42f329455667e48131c2a8d3d63f5ce2211d9a92)
(cherry picked from commit
d091e19bbdceafa915e63f71e13bb1e1955a62f5)
Daan De Meyer [Sat, 1 Aug 2020 14:05:01 +0000 (15:05 +0100)]
nspawn: Fix incorrect usage of putenv
strv_env_get only returns the environment variable value. putenv expects
KEY=VALUE format strings. Use setenv instead to fix the use.
(cherry picked from commit
6f646e01755df587bb33dae4ca78cdaad5721f5e)
(cherry picked from commit
b81504a3c76bfb3afd339cb74988892f9dccedd1)
(cherry picked from commit
492a8b34178cf851ded4f23815d1182025bbbf8a)
(cherry picked from commit
d56055f47f5ba86e0f56126e364b1939d035001f)
Amitanand.Chikorde [Thu, 30 Jul 2020 13:18:48 +0000 (18:48 +0530)]
udev: fix codesonar warnings
Fixed below systemd codesonar warning.
isprint() is invoked here with an argument of signed
type char, but only has defined behavior for int arguments that are
either representable as unsigned char or equal to the value
of macro EOF(-1).
As per codesonar report, in a number of libc implementations, isprint()
function implemented using lookup tables (arrays): passing in a
negative value can result in a read underrun.
(cherry picked from commit
e7e954243a17cceb5278aac6249ee0dcc119b1eb)
(cherry picked from commit
1b9c95bfbf7e5fc32e033851bf06f0a9f7f9f08b)
(cherry picked from commit
674a2beff0ac7b1cb0358401d6f64d726bca4e4f)
Yu Watanabe [Fri, 31 Jan 2020 10:21:11 +0000 (19:21 +0900)]
sd-boot: fix -Wpointer-sign warning
(cherry picked from commit
efda8aebcb0e3731ba56fa11499f318a50ea4e30)
(cherry picked from commit
16477684d2922b17c63e6799225bf2b92a020a80)
Zbigniew Jędrzejewski-Szmek [Thu, 16 Apr 2020 14:49:30 +0000 (16:49 +0200)]
network: fix static assertion on IPPROTO_MAX range
Builds with recent glibc would fail with:
../src/network/netdev/fou-tunnel.c: In function ‘config_parse_ip_protocol’:
../src/basic/macro.h:380:9: error: static assertion failed: "IPPROTO_MAX-1 <= UINT8_MAX"
380 | static_assert(expr, #expr)
| ^~~~~~~~~~~~~
../src/network/netdev/fou-tunnel.c:161:9: note: in expansion of macro ‘assert_cc’
161 | assert_cc(IPPROTO_MAX-1 <= UINT8_MAX);
| ^~~~~~~~~
This is because
f9ac84f92f151e07586c55e14ed628d493a5929d (present in
glibc-2.31.9000-9.fc33.x86_64) added IPPROTO_MPTCP=262, following
v5.5-rc5-1002-gfaf391c382 in the kernel.
(cherry picked from commit
3d58d7328a6ecbc61d3494803d705edd8a108d72)
(cherry picked from commit
c5e346905952fef0f163d91522dd43333f1f219d)
(cherry picked from commit
cc8aeb9916ee5ea026bec4cec8543ecfd73ed458)
Daniel Fullmer [Thu, 23 Apr 2020 18:47:56 +0000 (14:47 -0400)]
sd-boot: fix menu ordering with boot counting
systemd-boot selects the last valid entry by default, not the first.
Fixes: #15256
(cherry picked from commit
e6190e2882e1d6772a9e586fcc65c91d406e52fb)
(cherry picked from commit
c5883bc08877d8bad10110434037a3c21950a71a)
(cherry picked from commit
f047b0706c01f99c1b781f44b7b4d95ecdb8abe2)
Zbigniew Jędrzejewski-Szmek [Sun, 31 May 2020 16:21:09 +0000 (18:21 +0200)]
basic/user-util: always use base 10 for user/group numbers
We would parse numbers with base prefixes as user identifiers. For example,
"0x2b3bfa0" would be interpreted as UID==
45334432 and "01750" would be
interpreted as UID==1000. This parsing was used also in cases where either a
user/group name or number may be specified. This means that names like
0x2b3bfa0 would be ambiguous: they are a valid user name according to our
documented relaxed rules, but they would also be parsed as numeric uids.
This behaviour is definitely not expected by users, since tools generally only
accept decimal numbers (e.g. id, getent passwd), while other tools only accept
user names and thus will interpret such strings as user names without even
attempting to convert them to numbers (su, ssh). So let's follow suit and only
accept numbers in decimal notation. Effectively this means that we will reject
such strings as a username/uid/groupname/gid where strict mode is used, and try
to look up a user/group with such a name in relaxed mode.
Since the function changed is fairly low-level and fairly widely used, this
affects multiple tools: loginctl show-user/enable-linger/disable-linger foo',
the third argument in sysusers.d, fourth and fifth arguments in tmpfiles.d,
etc.
Fixes #15985.
(cherry picked from commit
156a5fd297b61bce31630d7a52c15614bf784843)
(cherry picked from commit
9498903de6c1f7b0c3e5f1654d0ee451a304c59d)
(cherry picked from commit
1d1f5006cbe239b29092602f59baa062f4ef95c6)
Yu Watanabe [Tue, 23 Jun 2020 07:10:25 +0000 (09:10 +0200)]
parse-util: backport safe_atou32_full()
We need this for a follow up security fix.
(cherry picked from commit
b934ac3d6e7dcad114776ef30ee9098693e7ab7e)
(cherry picked from commit
64126925181809e7c0b8916471186c0bfa19d6ce)
(cherry picked from commit
b07d782047fecfa29d9d94cc826ed70eb2a3ab13)
Zbigniew Jędrzejewski-Szmek [Tue, 30 Jun 2020 07:56:10 +0000 (09:56 +0200)]
Fix build with µhttpd 0.9.71
The return type of callbacks was changed from int to an enum.
(cherry picked from commit
d17eabb1052e7c8c432331a7a782845e36164f01)
(cherry picked from commit
a91ed646aa698ff530770c836c174fb7b3a5e799)
(cherry picked from commit
7bc54463ced882ac31fd42b2e34a9e764330a31a)
Oliver Giles [Thu, 13 Feb 2020 06:55:57 +0000 (08:55 +0200)]
makefs: strdup arguments to mkfs
Don't pass values from argv[] directly to child process forked using
safe_fork, because it clears argv[]. strdup them first.
(cherry picked from commit
c315b79fb43a4d921a533ba0c2cb303324887993)
(cherry picked from commit
ec9fd71358d617d5f178d42b82cf20f89973f687)
Yu Watanabe [Thu, 12 Dec 2019 10:01:21 +0000 (19:01 +0900)]
network-generator: allow empty hostname
Fixes #14319.
(cherry picked from commit
21a925a4ac7955e7d7e6cfd477e96d3a2aaee7db)
(cherry picked from commit
efd5b1d443fee81a48939e3f86e7feb338f26211)
Zbigniew Jędrzejewski-Szmek [Wed, 26 Feb 2020 22:34:41 +0000 (23:34 +0100)]
kernel-install: strip BOOT_IMAGE= from kernel options
https://bugzilla.redhat.com/show_bug.cgi?id=
1716164.
(cherry picked from commit
e60228bf68427c0c0f96f816ee9124fd39585038)
(cherry picked from commit
2095b6a279cfe6e9688c5c357d550289dfcd8e8d)
pelzvieh [Mon, 23 Mar 2020 10:15:11 +0000 (11:15 +0100)]
Franck Bui [Tue, 17 Mar 2020 17:30:58 +0000 (18:30 +0100)]
logind: log a more accurate error when we failed at session creation
We used to log the following error:
"Start job for unit user-1000.slice failed with 'canceled'"
which can be really misleading if the actual job failed at *stopping* a unit.
Indeed "Start" was hard coded but it was wrong since we can also fail with stop
jobs which are enqueued when a session is stopped.
(cherry picked from commit
b39648ed47065202b343d1d4bde3232d81fdfecc)
(cherry picked from commit
8f0feac20f7d4c29a42839343308fcd602ec5b63)
(cherry picked from commit
6aae7f596afd62a72b18c92f464abc8bebbc8cba)
Joerg Behrmann [Tue, 10 Mar 2020 15:34:13 +0000 (16:34 +0100)]
docs: Add syntax for templated units to systemd.preset man page
This documents the syntax
enable template@.service foo bar baz
that was introduced in #9901 to preset templated units.
(cherry picked from commit
1f667d8a7cff4355cd23ebebeb4d7179e3498eb8)
(cherry picked from commit
d1d3f2aa1561a9a75ce58026ef0a6bd4c5b464ac)
(cherry picked from commit
f4d5928122fe632b441145750a03d95fd8dd2cc6)
Zbigniew Jędrzejewski-Szmek [Wed, 11 Mar 2020 08:10:22 +0000 (09:10 +0100)]
Frantisek Sumsal [Sat, 14 Mar 2020 09:36:17 +0000 (10:36 +0100)]
test: wait a bit after starting the test service
otherwise we might end up being faster than the unit itself, causing
unexpected fails, like:
```
testsuite.sh[297]: + systemctl start issue_14566_test
testsuite.sh[297]: + systemctl status issue_14566_test
testsuite.sh[304]: ● issue_14566_test.service - Issue 14566 Repro
testsuite.sh[304]: Loaded: loaded (/etc/systemd/system/issue_14566_test.service; static; vendor preset: enabled)
testsuite.sh[304]: Active: active (running) since Sat 2020-03-14 02:02:23 UTC; 417ms ago
testsuite.sh[304]: Main PID: 301 ((repro.sh))
testsuite.sh[304]: Tasks: 1 (limit: 535)
testsuite.sh[304]: Memory: 180.0K
testsuite.sh[304]: CPU: 122ms
testsuite.sh[304]: CGroup: /system.slice/issue_14566_test.service
testsuite.sh[304]: └─301 [(repro.sh)]
testsuite.sh[307]: ++ cat /leakedtestpid
testsuite.sh[307]: cat: /leakedtestpid: No such file or directory
testsuite.sh[297]: + leaked_pid=
```
(cherry picked from commit
197298ff9fc930de450330095cc5b67d165d0801)
(cherry picked from commit
e110f4dacb6d56fc9d99456422c2cff7e54ae7f0)
(cherry picked from commit
dbe16df9cd50dc6c3662fb90295edebb37c2fdad)
Georg Müller [Thu, 12 Mar 2020 19:02:21 +0000 (20:02 +0100)]
fix journalctl regression (#15099)
This regression was introduced in #14913.
The current_file variable can be NULL, as, for example, with the
following commands:
* journalctl --list-boots
* journalctl -b -1 --no-pager
Since current_file is only checked for pointer equality with f, removing
the assertion is safe here.
(cherry picked from commit
8d0726fcd7b72f2a6f75dd731cbf7c8d4df107ef)
(cherry picked from commit
e8df08cfdb20e31066559c53420d7fd56b31ec01)
(cherry picked from commit
a713f52ddb09e8ef606c12e559d787355c67aa7e)
Anita Zhang [Sat, 25 Jan 2020 15:46:16 +0000 (16:46 +0100)]
core: transition to FINAL_SIGTERM state after ExecStopPost=
Fixes #14566
(cherry picked from commit
c1566ef0d22ed786b9ecf4c476e53b8a91e67578)
(cherry picked from commit
b7f2308bda4942d1b8e10250db6836fe4fc0d8b8)
(cherry picked from commit
49e7c3b617613306211cc8e28e68d4e5be8fbec4)
Georg Müller [Thu, 20 Feb 2020 18:19:41 +0000 (19:19 +0100)]
journalctl: show duplicate entries if they are from the same file (#14898)
When having a service which intentionally outputs multiple equal lines,
all these messages might be inserted with the same timestamp.
journalctl has a mechanism to avoid duplicate lines, which might be in
different journal files.
This patch allows duplicate lines, if they are from the same file.
(cherry picked from commit
b6849042d610da90d5821a03967d648d424f7864)
(cherry picked from commit
2867dfbf70a5d761f662fe4b7c81a67e19df008b)
(cherry picked from commit
d25598854dd7f517db160b5e377d379e34e72f28)
Valery0xff [Wed, 11 Mar 2020 00:20:36 +0000 (02:20 +0200)]
udev: fix SECLABEL{selinux} issue (#15064)
Add SECLABEL{selinux}="some value" cause udevadm crash
systemd-udevd[x]: Worker [x] terminated by signal 11 (SEGV)
It happens since
25de7aa7b90 (Yu Watanabe 2019-04-25 01:21:11 +0200)
when udev rules processing changed to token model. Yu forgot store
attr to SECLABEL token so fix it.
(cherry picked from commit
0335d110afc08baf47d76b7011ce02510dfdd524)
(cherry picked from commit
d58988be7fab2bf3e037ccf175f3cace41f82b80)
(cherry picked from commit
037a0fa5d06db080b8b5d1ae96ce067ee207f335)
Topi Miettinen [Mon, 9 Mar 2020 12:01:06 +0000 (14:01 +0200)]
dissect-image: avoid scanning partitions
In case the dissected image has a filesystem, don't scan for partitions. This
avoids problems with services using a `RootImage=` in early boot when udevd is
not yet started.
(cherry picked from commit
0108c42f59dd5848f6b561f260dc6ff3e19d651b)
(cherry picked from commit
98f8a718c161d45b0001ee68f2ec7d111da79397)
(cherry picked from commit
9de06cd65af80173140989b0b8338fe7411bf488)
Denis Pronin [Sun, 8 Mar 2020 20:57:07 +0000 (23:57 +0300)]
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)
bemarek [Sun, 8 Mar 2020 21:39:01 +0000 (22:39 +0100)]
James T. Lee [Sat, 7 Mar 2020 23:05:34 +0000 (18:05 -0500)]
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)
Zbigniew Jędrzejewski-Szmek [Fri, 7 Feb 2020 15:50:52 +0000 (16:50 +0100)]
Revert "Support Plugable UD-PRO8 dock"
This reverts commit
98c03090274a067806090e2974fd2091f8206457.
See https://github.com/systemd/systemd/issues/14822.
Zbigniew Jędrzejewski-Szmek [Tue, 3 Dec 2019 16:04:26 +0000 (17:04 +0100)]
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)
Zbigniew Jędrzejewski-Szmek [Wed, 5 Feb 2020 17:05:43 +0000 (18:05 +0100)]
hwdb: update to v245-rc1
The change in
419a8a2dabb4184080d06f583f9539780ec10ec6 is not included.
Addition of XKB_FIXED_MODEL is also excluded.
Zbigniew Jędrzejewski-Szmek [Tue, 4 Feb 2020 17:39:04 +0000 (18:39 +0100)]
Fix typo in function name
(cherry picked from commit
bc130b6858327b382b07b3985cf48e2aa9016b2d)
(cherry picked from commit
b4eb8848240c3540180e4768216a0b884a5ed783)
Lennart Poettering [Wed, 22 Jan 2020 16:07:47 +0000 (17:07 +0100)]
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)
Lennart Poettering [Wed, 22 Jan 2020 16:05:17 +0000 (17:05 +0100)]
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)
Lennart Poettering [Wed, 22 Jan 2020 15:53:59 +0000 (16:53 +0100)]
polkit: use structured initialization
(cherry picked from commit
f4425c72c7395ec93ae00052916a66e2f60f200b)
(cherry picked from commit
5926f9f1723fd753a0c524ed96a13538c851395e)
Lennart Poettering [Wed, 22 Jan 2020 15:52:10 +0000 (16:52 +0100)]
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)
Lennart Poettering [Wed, 22 Jan 2020 15:44:43 +0000 (16:44 +0100)]
polkit: reuse some common bus message appending code
(cherry picked from commit
95f82ae9d774f3508ce89dcbdd0714ef7385df59)
(cherry picked from commit
2589995acdb297a073270b54d8fff54b98fa57e9)
Lennart Poettering [Wed, 22 Jan 2020 13:29:43 +0000 (14:29 +0100)]
bus-polkit: rename return error parameter to ret_error
(cherry picked from commit
773b1a7916bfce3aa2a21ecf534d475032e8528e)
(cherry picked from commit
5b2442d5c3ec1c86a3a8d1c1abe3234a570ba5e6)
Lennart Poettering [Wed, 22 Jan 2020 10:39:22 +0000 (11:39 +0100)]
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)
Frantisek Sumsal [Tue, 4 Feb 2020 12:49:01 +0000 (13:49 +0100)]
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)
Zbigniew Jędrzejewski-Szmek [Mon, 3 Feb 2020 19:38:54 +0000 (20:38 +0100)]
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)
Zbigniew Jędrzejewski-Szmek [Mon, 3 Feb 2020 14:45:07 +0000 (15:45 +0100)]
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)
Zbigniew Jędrzejewski-Szmek [Thu, 16 Jan 2020 14:53:57 +0000 (15:53 +0100)]
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)
Yu Watanabe [Thu, 30 Jan 2020 11:18:35 +0000 (20:18 +0900)]
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)
Yu Watanabe [Wed, 29 Jan 2020 11:39:12 +0000 (20:39 +0900)]
network: fix implicit type conversion warning by GCC-10
Fixes part of #14691.
(cherry picked from commit
a44956c94a93fe34b5398ed9aefcf0fc705d4fa6)
(cherry picked from commit
0ed6cda28dffc19dd3f6e08d3f16e4135de253b5)
Yu Watanabe [Sun, 26 Jan 2020 04:05:13 +0000 (13:05 +0900)]
bootspec: parse random-seed-mode line in loader.conf
Fixes #14657.
(cherry picked from commit
fe5a698f7646735335a97cc429ebe5d79f67fb70)
(cherry picked from commit
f6a5c02d26b1687bdc34ed595c64b7c7c24b6525)
Yu Watanabe [Sun, 26 Jan 2020 03:59:48 +0000 (12:59 +0900)]
sd-boot: fix typo
Fixes #14657.
(cherry picked from commit
a14c18ba7b4e85f34bd48c5a778ea5eafe5c8688)
(cherry picked from commit
ddc5dca8a73b6c4317b8540b388116cd63b0697f)
dann frazier [Tue, 28 Jan 2020 01:45:17 +0000 (18:45 -0700)]
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)
sangelovic [Mon, 27 Jan 2020 20:40:37 +0000 (21:40 +0100)]
sd-bus: fix introspection bug in signal parameter names
(cherry picked from commit
58abbbcc6bcedc4eebd1f5c7733cd41518e1f2e3)
(cherry picked from commit
072485d661d73e8834dc667deea2c5aaa6527977)
Susant Sahani [Sat, 25 Jan 2020 10:30:08 +0000 (11:30 +0100)]
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)
Lennart Poettering [Tue, 21 Jan 2020 09:40:18 +0000 (10:40 +0100)]
generator: order growfs for the root fs after systemd-remount-fs
Fixes: #14603
(cherry picked from commit
18e6e8635f06ac8d935ed5494ea65c6dac6af90f)
(cherry picked from commit
d7ede1ade56426db83523523e473ed52133c39af)
Lennart Poettering [Tue, 21 Jan 2020 12:43:04 +0000 (13:43 +0100)]
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)
Antonio Russo [Tue, 21 Jan 2020 02:35:13 +0000 (19:35 -0700)]
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)
Andreas Rammhold [Tue, 21 Jan 2020 17:22:22 +0000 (18:22 +0100)]
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)
Lennart Poettering [Tue, 21 Jan 2020 11:03:02 +0000 (12:03 +0100)]
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)
Lennart Poettering [Mon, 20 Jan 2020 16:11:31 +0000 (17:11 +0100)]
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)
Lennart Poettering [Tue, 21 Jan 2020 09:49:58 +0000 (10:49 +0100)]
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)
Lennart Poettering [Mon, 20 Jan 2020 13:40:44 +0000 (14:40 +0100)]
test: add test for https://github.com/systemd/systemd/issues/14560
(cherry picked from commit
e56a8790a0bf9021d693daef037cd6af85badf0d)
(cherry picked from commit
536ef6d72bc6cd76f3aff02d3bbbd17810216cce)
Lennart Poettering [Fri, 17 Jan 2020 11:41:53 +0000 (12:41 +0100)]
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)
Sascha Dewald [Sat, 18 Jan 2020 08:17:57 +0000 (08:17 +0000)]
pkgconf: add full generator paths
(cherry picked from commit
fc57f105d9e2b2e9e95bb739d23fa7711b5fa4b3)
(cherry picked from commit
a1561a08f2d5af9ebc68916ce0cb430091a64bce)
Lennart Poettering [Fri, 17 Jan 2020 14:37:56 +0000 (15:37 +0100)]
tree-wide: we forgot to destroy some bus errors
(cherry picked from commit
7e284b054ec599012f0dad6a745f6b52eba87853)
(cherry picked from commit
e5f2d11489ec4852f1ad45a1271f502d20602126)
Lennart Poettering [Fri, 17 Jan 2020 14:09:01 +0000 (15:09 +0100)]
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)
Lennart Poettering [Fri, 17 Jan 2020 14:02:13 +0000 (15:02 +0100)]
core: never allow perpetual units to be masked
Fixes: #14550
(cherry picked from commit
88414eed6f45f738ae765d9f72d67c6dc5a51950)
(cherry picked from commit
2f23c648bce479ed275b8f337e399880b5795711)
Wieland Hoffmann [Sat, 18 Jan 2020 07:38:29 +0000 (08:38 +0100)]
typo: "May modify to" -> "May modify"
(cherry picked from commit
287cf2d802263c909553689869b2146c67bb765f)
(cherry picked from commit
9ba11dffb09a7f4b63be8a5970fb51d600b53087)
Zbigniew Jędrzejewski-Szmek [Thu, 16 Jan 2020 13:45:28 +0000 (14:45 +0100)]
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)
Luca Boccassi [Thu, 16 Jan 2020 16:24:07 +0000 (16:24 +0000)]
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)
Lennart Poettering [Mon, 6 Jan 2020 19:13:16 +0000 (20:13 +0100)]
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)
Lennart Poettering [Mon, 13 Jan 2020 19:06:39 +0000 (20:06 +0100)]
cgroup: update only siblings that got realized once
Fixes: #14475
Replaces: #14554
(cherry picked from commit
e1e98911a818ad3b46c6a1c26d759df590bef476)
(cherry picked from commit
b1a0be45b4ee20a2ca4426ff6a9d9fce0664960c)
Jun'ichi Nomura [Tue, 3 Dec 2019 07:52:02 +0000 (16:52 +0900)]
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)
Timo Schlüßler [Mon, 13 Jan 2020 09:26:58 +0000 (09:26 +0000)]
journalctl: Correctly handle combination of --reverse and --lines (fixes #1596)
(cherry picked from commit
23b392166388003530fef02ac5758c91315a707b)
(cherry picked from commit
d8fd38769c36ef9b2e5e122c345bca05ef2be88f)
Timo Schlüßler [Mon, 13 Jan 2020 09:09:45 +0000 (09:09 +0000)]
journalctl: Correctly handle --show-cursor in combination with --until or --since and --reverse
(cherry picked from commit
3ac9cac7f7a34c3713b49841ee75ef9c9357e7e4)
(cherry picked from commit
cd19bd31d8081f4a97201a20cdaee1fb1d3fafdd)
Lennart Poettering [Thu, 9 Jan 2020 16:30:31 +0000 (17:30 +0100)]
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)
Lennart Poettering [Thu, 9 Jan 2020 10:51:40 +0000 (11:51 +0100)]
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)
HATAYAMA Daisuke [Wed, 18 Dec 2019 03:01:42 +0000 (22:01 -0500)]
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)
Lennart Poettering [Thu, 9 Jan 2020 11:01:45 +0000 (12:01 +0100)]
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)
Thomas Schmitt [Mon, 6 Jan 2020 07:10:32 +0000 (15:10 +0800)]
udev: don't import parent ID_FS_ data on partitions
When probing partitions, we inherit important information from the parent
disk device such as ID_MODEL, and usage of such properties is seen to
be acceptable and well established.
However, we need to exclude filesystem information from the properties
that get inherited. Information about the device content should not be
passed on in this way.
For example, Linux distro install media commonly uses an ISO filesystem
plus a partition table. The ISO filesystem is detected on the main disk
device, but we should not pass down those details to the partitions,
some or all of which may be pointing at storage areas completely distinct
from the ISO filesystem.
This is particularly problematic when adding new partitions on media
set up in this way (since the new partitions are then reported to contain
the parent device's ISO filesystem), or when dealing with more unusual
hybrid ISO layouts. The inaccuracy of information here inversely affects
users of blkid and udev's persistent storage symlinks.
Exclude ID_FS_* properties from the inheritance chain to avoid these
problems.
Fixes: #14408
(cherry picked from commit
19212f27816686a5cac2c965301cea8624ac467f)
(cherry picked from commit
377cc5d91ea563c9b6659b7481b020ecff5619d2)
Zbigniew Jędrzejewski-Szmek [Wed, 8 Jan 2020 09:39:44 +0000 (10:39 +0100)]
ezst036 [Wed, 8 Jan 2020 00:47:15 +0000 (19:47 -0500)]
Support Plugable UD-PRO8 dock
Add support for Plugable Pro8 docking station for auto-configuring seat
(cherry picked from commit
95f2b4dd237faa57fd3e93245d560e47cdedfc2c)
(cherry picked from commit
98c03090274a067806090e2974fd2091f8206457)
Lennart Poettering [Tue, 7 Jan 2020 16:21:24 +0000 (17:21 +0100)]
gpt-auto: don't assume XBOOTLDR is vfat
Let's not assume "umask=" is a valid mount option for XBOOTLDR
partitions unconditionally.
Fixes: #14165
(cherry picked from commit
4f0840669e172a2570b17b0991459d3a6839f804)
(cherry picked from commit
e9687d09dccf7f6d5093adb280ba96d00f25fbf8)
Lennart Poettering [Tue, 7 Jan 2020 17:02:15 +0000 (18:02 +0100)]
man: fix documentation of IBM VIO device naming
We generate "v" in two different ways, and they got mixed up.
(cherry picked from commit
a1686563ded4cb6967034a59a61a50534c952dad)
(cherry picked from commit
7057fe8630079bf778dfa7d3ba841515bcc20eab)
Lennart Poettering [Tue, 7 Jan 2020 17:01:56 +0000 (18:01 +0100)]
man: slightly extend documentation on difference between ID_NET_NAME_ONBOARD and ID_NET_LABEL_ONBOARD
(cherry picked from commit
e232c307c052c85825e5017be868e1bd6bf4f97a)
(cherry picked from commit
f8d1df1045bebf9d8878010bcb22fd7afe7f8701)
Lennart Poettering [Tue, 7 Jan 2020 14:20:32 +0000 (15:20 +0100)]
boot: fix osrel parser
let's check VERSION instead of VERSION_ID where appropriate.
Fixes: #14493
(cherry picked from commit
4353974d75940352486bac21b877a598e70558d5)
(cherry picked from commit
1faf5dde4d4a507a612e719c3a7d09d4a2dd5663)
Yu Watanabe [Tue, 7 Jan 2020 10:22:59 +0000 (19:22 +0900)]
udev: do not use exact match of file permission
This partially reverts
25de7aa7b90c23d33ea50ada1e50c5834a414237.
Fixes #14473.
(cherry picked from commit
7a182f10343796eab92a8256e347c11b4be78ea7)
(cherry picked from commit
65d247af178678881b4a3c1ef594910ddf0654b3)
Yu Watanabe [Mon, 6 Jan 2020 07:48:27 +0000 (16:48 +0900)]
network: lower the log-level of harmless message
Closes #14285.
(cherry picked from commit
d6246fd498ab0e4a9a78bcfd4cc1625af16f4784)
(cherry picked from commit
6da978f89b48ce095905167298ade297230d4a3c)
Zbigniew Jędrzejewski-Szmek [Thu, 19 Dec 2019 10:48:46 +0000 (11:48 +0100)]
hwdb: ignore keys added in kernel 5.5
python-evdev needs to be rebuilt with new kernel headers. Before that
happens, our test would reject those keys as unknown.
(cherry picked from commit
12c7d4d65e4fbc95b2f76853bdcf4fdc554d5c11)
(cherry picked from commit
5d8a614f926c85ec11d66043d160c63665f0dd56)
Frantisek Sumsal [Sat, 28 Dec 2019 11:29:19 +0000 (12:29 +0100)]
systemctl: skip non-existent units in the 'cat' verb
When processing list of units (either provided manually or as a
wildcard), let's skip units for which we don't have an on-disk
counterpart, but note the -ENOENT error code and propagate it back to
the user.
Fixes: #14082
(cherry picked from commit
a25457f5b7689265bd2235c4da218896e7c5c1d0)
(cherry picked from commit
8b1bd17469892de5838509c6794a8a38432c01b0)
Topi Miettinen [Sat, 28 Dec 2019 17:38:27 +0000 (19:38 +0200)]
systemd.exec: document the file system for EnvironmentFile paths
Files specified with EnvironmentFile are read from PID1 mount namespace, before
any file system operations like RootImage or BindPaths are in effect.
(cherry picked from commit
412a6c646ced41ac9b12c4a4f97e34c0350e1040)
(cherry picked from commit
b2f342f92b5447b68c5c61a1d078c62f26ddfd20)
Tobias Stoeckmann [Tue, 31 Dec 2019 12:56:02 +0000 (13:56 +0100)]
systemd-analyze: fixed typo in documentation
The example shows the output of critical-chain, which means
that the title is wrong.
(cherry picked from commit
be78e0f07b2379f51e6530269be953c0b520c447)
(cherry picked from commit
945f3a231f6fd0b5fa1dd3e11b9223b4c1dff37a)
Felipe Sateler [Tue, 24 Dec 2019 01:04:44 +0000 (22:04 -0300)]
test-condition: fix group check condition
We were checking the uid, whereas we should have checked the gid
(cherry picked from commit
98cd752a285c0fba84b8d98f3ba255ed4d11c881)
(cherry picked from commit
2c8ae283b0eebdbc92f4832fca8e46a00be5b246)
Lennart Poettering [Fri, 20 Dec 2019 15:59:42 +0000 (16:59 +0100)]
umount: show correct error message
We fucked up errno vs. r two times, let's correct that.
While we are at it, let's handle the error first, like we usually do,
and the clean case without indentation.
(cherry picked from commit
88287615e631d2023ff337a08b6ff45b1cfa58ee)
(cherry picked from commit
6b48479f458257ff1769c88d46208ba56209b067)
Lennart Poettering [Fri, 20 Dec 2019 11:26:17 +0000 (12:26 +0100)]
Revert "Drop dbus activation stub service"
This reverts commit
07125d24eedb71693b3bf2b1f0730cd01aaac2dd.
In contrast to what is claimed in #13396 dbus-broker apparently does
care for the service file to be around, and otherwise will claim
"Service Not Activatable" in the time between systemd starting up the
broker and connecting to it, which the stub service file is supposed to
make go away.
Reverting this makes the integration test suite pass again on host with
dbus-broker (i.e. current Fedora desktop).
Tested with dbus-broker-21-6.fc31.x86_64.
(cherry picked from commit
b895fa08e6809ab54e20888f7d01ae848272e981)
(cherry picked from commit
faba5b2ba8c9cc07e431ab02b4917fc782cb89b9)
Zbigniew Jędrzejewski-Szmek [Wed, 18 Dec 2019 10:23:30 +0000 (11:23 +0100)]
man: add section about user manager units
(cherry picked from commit
277519db51291c7e11b2120016c39914520f5009)
(cherry picked from commit
3dd98f1998f92f69a4159d1d254dcb3c522ec840)
Zbigniew Jędrzejewski-Szmek [Wed, 18 Dec 2019 09:32:03 +0000 (10:32 +0100)]
man: add remote-*.targets to the bootup sequence
I think this makes it easier to see the difference between local and remote
mounts.
Make the graph a bit narrower while at it.
(cherry picked from commit
f71502c49fd9fce6328f9364f600578383551dce)
(cherry picked from commit
1c80a8ced006f92dc83e7ec36edd0005d4e54a76)
Lennart Poettering [Wed, 18 Dec 2019 13:57:11 +0000 (14:57 +0100)]
time-util: also use 32bit hack on EOVERFLOW
As per
https://github.com/systemd/systemd/issues/14362#issuecomment-
566722686
let's also prepare for EOVERFLOW.
(cherry picked from commit
9e7c8f64cfda101496f56f5546097221e8ad5d6a)
(cherry picked from commit
9afd65f15e931f777e2ba3743560d63505c90ac7)
Anita Zhang [Thu, 19 Dec 2019 00:09:49 +0000 (16:09 -0800)]
[man] note which UID ranges will get user journals
Fixes #13926
(cherry picked from commit
a1533ad73f099ed7f2c01a69c23ad700fbf249f3)
(cherry picked from commit
56192329138370e43bdce7f9a2a069985fec2eba)
Anita Zhang [Thu, 19 Dec 2019 00:08:53 +0000 (16:08 -0800)]
Topi Miettinen [Wed, 18 Dec 2019 18:25:03 +0000 (20:25 +0200)]
analyze: badness if neither of RootImage and RootDirectory exists
Instead of requiring both RootImage and RootDirectory directives, give badness
points if neither is present. Fixes conversion in
d737b451f.
(cherry picked from commit
d909b40fda52d6822a0f7201f9c17818df2bd091)
(cherry picked from commit
0130a03179f687c050247ee7e4367f0f4987a7f2)
Dimitri John Ledkov [Fri, 13 Dec 2019 23:22:51 +0000 (23:22 +0000)]
initrd: make udev cleanup service confict trigger and settle too
Otherwise, systemd-udev-trigger|settle.service that ran in the initrd may
ramain active, and never re-run again from the system root.
This is observed by forexample examining ESP with udevadm info, which in the
initrd has all the ID_* variables, and none of them in fully booted system.
(cherry picked from commit
f27bb6abd3b825034e0dde631ae3047128d2162d)
(cherry picked from commit
946cdba156dd385ffa86131664d808f36aaa24b7)
Lennart Poettering [Tue, 17 Dec 2019 16:30:55 +0000 (17:30 +0100)]
man: we support growing xfs too these days
(cherry picked from commit
76b73ce21c0a4063696bd7c777ae12d99cd8fb69)
(cherry picked from commit
c0a8a92e6027c4eb4ce6611c4910284f52029f7f)
Lennart Poettering [Tue, 17 Dec 2019 10:22:17 +0000 (11:22 +0100)]
time-util: deal with systems where userspace has 64bit time_t but kernel does not
Fixes: #14362
(cherry picked from commit
601f91bec5646a9c6fbd4f1ec5f1b4ae28d3a770)
(cherry picked from commit
608d882734946f201c9db64777ef877c52b3a6b1)
Anita Zhang [Tue, 17 Dec 2019 09:08:04 +0000 (01:08 -0800)]
[import] fix stdin/stdout pipe behavior in import/export tar/raw
The code existed in machinectl to use stdin/stdout if the path for
import/export tar/raw was empty or dash (-) but a check to
`fd_verify_regular` in importd prevented it from working.
Update the check instead to explicitly check for regular file or
pipe/fifo.
Fixes #14346
(cherry picked from commit
1209ef94bd09bdc67a7b51f084910a5982f2f010)
(cherry picked from commit
cfced59a4bd88e7d77ecf9ed40a22ec215356a83)
Zbigniew Jędrzejewski-Szmek [Tue, 3 Dec 2019 15:06:47 +0000 (16:06 +0100)]
cryptsetup-generator: unconfuse writing of the device timeout
The code was using timeout=0 as the default option string. This option string
was ultimately passed to generator_write_timeouts(), which only looks for
comment=systemd.device-timeout= or x-systemd.device-timeout=, i.e. the whole
call path was bogus. Let's rework this: generator_write_timeouts() now writes
any timeouts if configured by the user. create_disk() writes out it's own
timeout, but with lower priority. Since the code path that was calling
timeout=0 was not effective, the only change is that we stop overwriting the
timeout if explicitly configured by the user.
In both code paths, ignore failure to write.
(cherry picked from commit
7cecc563163f539c497ecdf5ab00729fcd8c97c1)
(cherry picked from commit
dc56b94e13089bbabcf75d962a11fec26b829093)