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

8187 Commits

Author SHA1 Message Date
Lennart Poettering
1072d94731 run: optionally set the "ignore-failure" flag for ExecStart= lines 2023-12-21 19:14:43 +01:00
Lennart Poettering
72eb3081b2 run: when invoked as "uid0", expose some sudo-like behaviour
This turns "systemd-run" into a multi-call binary. When invoked under
the name "uid0", then it behaves a bit more like traditional "sudo".
This mostly means defaults appropriuate for that, for example a PAM
stack, interactivity and more.

Fixes: #29199
2023-12-21 19:14:43 +01:00
Lennart Poettering
d1a5be82ef core: imply SetLoginEnvironment= if PAMName= is set
This geneally makes sense as setting up a PAM session pretty much
defines what a login session is.

In context of #30547 this has the benefit that we can take benefit of
the SetLoginEnvironment= effect without having to set it explicitly,
thus retaining some compat of the uid0 client towards older systemd
service managers.
2023-12-21 10:14:21 +01:00
Mike Yuan
bc9e592c4f systemctl: configure boot loader options only when going through firmware
Fixes #30497
2023-12-21 01:35:55 +09:00
Yu Watanabe
63d0491bbc
Merge pull request #30536 from yuwata/network-bridge-vlan-debugging-logs
network/bridge-vlan: add debugging logs and documentation update
2023-12-20 23:46:01 +09:00
Yu Watanabe
8f876e8d98
Merge pull request #30525 from YHNdnzj/networkctl-mask
networkctl: introduce verb mask and unmask
2023-12-20 21:00:36 +09:00
Yu Watanabe
03a46b5eca man,NEWS: mention that all previously assigned VLAN IDs are cleared
Addresses https://github.com/systemd/systemd/pull/29987#issuecomment-1863934902.
2023-12-20 19:22:53 +09:00
Yu Watanabe
b9e6e92510 man: fix indentation 2023-12-20 19:21:11 +09:00
Yu Watanabe
044149e615 man: environment value -> udev property
These are not environment variables, but udev properties.

Follow-up for 3b2e7dc5a2.
2023-12-20 15:08:52 +09:00
Mike Yuan
28bb29cbb4
networkctl: introduce verb mask and unmask
Suggested in https://github.com/systemd/systemd/pull/29928#discussion_r1386626565
2023-12-20 12:46:46 +08:00
Lukas Nykryn
3b2e7dc5a2 udev: allow/denylist for reading sysfs attributes when composing a NIC name
Users can currently pick specific versions of NIC naming, but that
does not guarantee that NIC names won't change after the kernel adds
a new sysfs attribute.

This patch allows for an allow/deny list of sysfs attributes
that could be used when composing the name.

These lists can be supplied as an hwdb entry in the form of
/etc/udev/hwdb.d/50-net-naming-allowlist.hwdb
net:naming:drvirtio_net
  ID_NET_NAME_ALLOW=0
  ID_NET_NAME_ALLOW_ACPI_INDEX=1
  ID_NET_NAME_ALLOW_ADDR_ASSIGN_TYPE=1
  ID_NET_NAME_ALLOW_ADDRESS=1
  ID_NET_NAME_ALLOW_ARI_ENABLED=1
  ID_NET_NAME_ALLOW_DEV_PORT=1
  ID_NET_NAME_ALLOW_FUNCTION_ID=1
  ID_NET_NAME_ALLOW_IFLINK=1
  ID_NET_NAME_ALLOW_INDEX=1
  ID_NET_NAME_ALLOW_LABEL=1
  ID_NET_NAME_ALLOW_PHYS_PORT_NAME=1
  ID_NET_NAME_ALLOW_TYPE=1
2023-12-19 19:15:52 +09:00
Frantisek Sumsal
31dcc1b4ba man: avoid potential shell expansion in systemctl's example
Resolves: #30014
2023-12-18 17:09:06 +01:00
Lennart Poettering
3ccadbce33 homectl: add "firstboot" command
This extends what systemd-firstboot does and runs on first boots only
and either processes user records passed in via credentials to create,
or asks the user interactively to create one (only if no regular user
exists yet).
2023-12-18 11:10:53 +01:00
Lennart Poettering
68f74b0af2
Merge pull request #30479 from keszybz/man-pages-synopsis-layout
Man pages synopsis layout
2023-12-18 10:44:58 +01:00
Zbigniew Jędrzejewski-Szmek
ace3e93fee man: use <simplelist> for two more lists 2023-12-15 14:32:50 +01:00
Zbigniew Jędrzejewski-Szmek
73e97bb064 man: use <simplelist> for file lists in synopsis
With <para><filename>…</filename></para>, we get a separate "paragraph" for
each line, i.e. entries separated by empty lines. This uses up a lot of space
and was only done because docbook makes it hard to insert a newline. In some
other places, <literallayout> was used, but then we cannot indent the source
text (because the whitespace would end up in the final page). We can get the
desired result with <simplelist>.

With <simplelist> the items are indented in roff output, but not in html
output. In some places this looks better then no indentation, and in others it
would probably be better to have no indent. But this is a minor issue and we
cannot control that.

(I didn't convert all spots. There's a bunch of other man pages which have two
lines, e.g. an executable and service file, and it doesn't matter there so
much.)
2023-12-15 14:27:28 +01:00
Andrew Sayers
ff47602f5e Fix a typo in the org.freedesktop.systemd1 man page 2023-12-15 07:39:05 +09:00
Zbigniew Jędrzejewski-Szmek
f36c796e0f man/tmpfiles: update summary
It hasn't been just about "volatile" and "files" for a long time.
2023-12-14 12:52:28 +01:00
Zbigniew Jędrzejewski-Szmek
0b4cf0a540
Merge pull request #30232 from keszybz/ukify-imports
Use exec() to import ukify
2023-12-13 14:38:03 +01:00
Yu Watanabe
0977039bdc
Merge pull request #30433 from yuwata/network-nexthop-cleanups
network: introduce ManageForeignNextHops=
2023-12-13 14:16:27 +09:00
Will Springer
e014a19420 man: make minor corrections to smbios-type-11(7)
- Correct initial version of io.systemd.credential* to 252
- Fix leftover copy-pasted heading
2023-12-13 00:58:23 +00:00
Yu Watanabe
bbc05bec98 network/nexthop: introduce ManageForeignNextHops= boolean setting
Closes #29034.
2023-12-12 23:51:10 +09:00
Yu Watanabe
a753d30303 systemctl: fix typo
Follow-up for 329050c5e2.
2023-12-10 14:26:33 +09:00
Luca Boccassi
6c75eff6af core: create workdir/upperdir when mounting a Type=overlay mount unit
So far we created the target directory, and the source for bind mounts,
but not workdir/upperdir for overlays, so it has to be done separately
and strictly before the unit is started, which is annoying. Check the
options when creating directories, and if upper/work directories are
specified, create them.
2023-12-08 11:22:14 +09:00
Shulhan
59b13e07f2 man: correct the path for location of "machinectl edit" setting file
The correct path where setting file located should be
"under /etc/systemd/nspawn", not "under /etc".
2023-12-07 14:51:05 +00:00
Yu Watanabe
786a337817
Merge pull request #30060 from poettering/analyze-archs
analyze: add "archs" verb that lists all known architectures
2023-12-07 15:47:30 +09:00
Daan De Meyer
b952663cd1 gpt-auto-generator: Pass cryptsetup credentials to cryptsetup
cryptsetup reads a bunch of credentials now but we don't pass import
those in any service units yet. Let's pass through all cryptsetup
prefixed credentials to the systemd-cryptsetup@root instance.
2023-12-06 23:37:32 +01:00
Zbigniew Jędrzejewski-Szmek
34f4fcb59f
Merge pull request #30302 from keszybz/systemd-edit-stdin
systemctl edit --stdin
2023-12-06 22:28:02 +01:00
Zbigniew Jędrzejewski-Szmek
fd72d1e794
Merge pull request #30085 from YHNdnzj/networkctl-edit-runtime
networkctl: introduce --runtime for editing network config under /run/
2023-12-06 22:27:01 +01:00
Zbigniew Jędrzejewski-Szmek
bfa95c369a
Merge pull request #29987 from yuwata/network-bridge-vlan
network: remove unnecessary bridge vlan IDs
2023-12-06 22:25:42 +01:00
Zbigniew Jędrzejewski-Szmek
d1f9a39ef4
Merge pull request #29853 from YHNdnzj/sleep-automated
logind: support Sleep() that automatically choose a sleep operation
2023-12-06 22:25:13 +01:00
Samuel BF
435c372ce5 journal-gatewayd: add since/until parameters for /entries
Request with Range header like 'entries=<cursor>:' (with a colon at the end,
invalid syntax per the doc), is now rejected with error 400 Bad Request.

fix #4883
2023-12-06 22:22:27 +01:00
Lennart Poettering
fb8cc599ed analyze: add "architectures" verb that lists all known architectures 2023-12-06 22:18:14 +01:00
Luca Boccassi
f08d1fea30
Merge pull request #30295 from yuwata/hostnamectl-machine-id
hostnamectl: read machine ID and boot ID through DBus
2023-12-06 21:12:36 +00:00
Lennart Poettering
ffc1ec73b3 pid1: add ProtectSystem= as system-wide configuration, and default it to true in the initrd
This adds a new ProtectSystem= setting that mirrors the option of the
same of services, but in a more restrictive way. If enabled will remount
/usr/ to read-only, very early at boot. Takes a special value "auto"
(which is the default) which is equivalent to true in the initrd, and
false otherwise.

Unlike the per-service option we don't support full/strict modes, but
the door is open to eventually support that too if it makes sense. It's
not entirely trivial though as we have very little mounted this early,
and hence the mechanism might not apply 1:1. Hence in this PR is a
conservative first step.

My primary goal with this is to lock down initrds a bit, since they
conceptually are mostly immutable, but they are unpacked into a mutable
tmpfs. let's tighten the screws a bit on that, and at least make /usr/
immutable.

This is particularly nice on USIs (i.e. Unified System Images, that pack
a whole OS into a UKI without transitioning out of it), such as
diskomator.
2023-12-06 22:10:20 +01:00
Daan De Meyer
8e3dc737b2
Merge pull request #30241 from poettering/journalctl-short-file-switch
journalctl: add short option "-i" for "--file="
2023-12-06 22:07:41 +01:00
Luca Boccassi
f9a284f02d
Merge pull request #30214 from bluca/wants_mounts_for
Add WantsMountsFor= and use it in the cryptsetup generator
2023-12-06 21:00:37 +00:00
Yu Watanabe
5db7eb21f9 hostname: expose machine ID and boot ID through DBus
Fixes #30293.
2023-12-06 20:51:13 +09:00
Zbigniew Jędrzejewski-Szmek
329050c5e2 systemctl: add "edit --stdin"
This is a fancy wrapper around "cat <<EOF", but:
- the user doesn't need to figure out the file name,
- parent directories are created automatically,
- daemon-reload is implied,
so it's a convenient way to create units or drop-ins.

Closes https://github.com/systemd/systemd/issues/21862.
2023-12-05 18:47:19 +01:00
Mike Yuan
5b3562898a
systemctl: add support for Sleep() logind call 2023-12-05 22:18:32 +08:00
Mike Yuan
cd4dd90b99
logind: introduce Sleep() call and action that automatically choose a sleep operation 2023-12-05 22:18:32 +08:00
huyubiao
3769ba7570 fix: The example2 in hwdb.xml is unreasonable
use evdev:atkbd:dmi:bvnAcer:bvr:bdXXXXX:bd08/05/2010:svnAcer:pnX123: instead of evdev:atkbd:dmi:bvnAcer:bdXXXXX:bd08/05/2010:svnAcer:pnX123
2023-12-05 14:09:18 +01:00
Zbigniew Jędrzejewski-Szmek
465a9d2af8 man/systemctl: fix indentation of <xi:include>'s 2023-12-02 21:21:52 +01:00
Mike Yuan
2b98926f98
networkctl: introduce --runtime for editing network config under /run/ 2023-12-02 17:04:57 +08:00
Zbigniew Jędrzejewski-Szmek
ef126bbe89 man/ukify: link to competing tools
Right now each of the three invocations yields a part of the picture.
Let's make it easier for users to discover the right tools.
2023-12-01 10:29:39 +01:00
Joerg Behrmann
d4506301f9 man: document how to properly use a target as the Unit= of a timer 2023-11-30 17:14:31 +00:00
Lennart Poettering
dde54b8a85 journalctl: add short option "-i" for "--file="
I see myself frequently typing in "journalctl --file=…". That's a lot to
type. Let's add a short switch too. Unfortunately, "-f" and "-F" are
already taken, hence let's pick "-i".
2023-11-30 16:21:00 +01:00
Lennart Poettering
12f2576854 man: add '=' suffix to journalctl switches that take parameter
As per coding style recommendations.
2023-11-30 16:21:00 +01:00
Luca Boccassi
c9be8e420e cryptsetup: use WantsMountsFor= for key/header when nofail is set
The header and keyfile are necessary only for opening the device, not
for closing, so it is not necessary to deactivate the generated
cryptsetup unit when the header or keyfile backing store are removed.

This is especially useful in the case of softreboot, when the new
mount root is setup under /run/nextroot/ but we don't want to close
the cryptsetup devices for encrypted /var/ or so, and we simply
mount it directly on /run/nextroot/var/ before the soft-reboot.
2023-11-29 11:04:59 +00:00
Luca Boccassi
9e615fa3aa core: add WantsMountsFor=
This is the equivalent of RequiresMountsFor=, but adds Wants= instead
of Requires=. It will be useful for example for the autogenerated
systemd-cryptsetup units.

Fixes https://github.com/systemd/systemd/issues/11646
2023-11-29 11:04:59 +00:00