]> git.ipfire.org Git - thirdparty/systemd.git/commit
pid1: assume user namespaces are unavailable if we get -EINVAL from clone()
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 2 Dec 2024 10:23:24 +0000 (11:23 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 2 Dec 2024 10:30:06 +0000 (11:30 +0100)
commitafb368951cbe40214e56d3e546b22b1c9d3c1948
tree02313b0a779789b3036b8b628a93e970a2b1a760
parent703b1b7f243f0faabfcc4968712d8beb65a951a8
pid1: assume user namespaces are unavailable if we get -EINVAL from clone()

As reported in https://github.com/systemd/systemd/issues/35400,
on riscv64, with Linux version 6.6.51-linux4microchip+fpga-2024.09, we get:

[   10.063727] systemd[1]: systemd-modules-load.service: About to execute: /usr/lib/systemd/systemd-modules-load
[   10.071148] (journald)[104]: Failed to fork process (sd-mkuserns): Invalid argument

Fixes https://github.com/systemd/systemd/issues/35400.

'r' is used to make the repeated checks shorter. Without that, the long variable
name is distracting.
src/basic/namespace-util.c