Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
fb7f2c9
core/main: log about save_env() error
YHNdnzj Mar 8, 2025
680b2d7
core/main: assign mac_init() retval to r
YHNdnzj Mar 5, 2025
70decf5
core/main: preemptively check existence of init only if we're switchi…
YHNdnzj Mar 8, 2025
34898e9
core/main: correct retval for reexec/switch-root/soft-reboot
YHNdnzj Mar 5, 2025
0fa0eea
umount: do not move busy network mounts
aafeijoo-suse Mar 10, 2025
b979c07
manager: explicitly create our private runtime directory
poettering Mar 13, 2025
80aaf29
analyze: don't connect to bus from analyze test run
poettering Mar 12, 2025
e0dfa23
test-execute: prominently show which test we are about to enter
poettering Mar 13, 2025
2308852
getty-generator: don't use "3270!tty1" when instantiating serial-gett…
fbuihuu Mar 12, 2025
7be89c8
udevadm: check number of passed arguments
poettering Mar 14, 2025
532bb02
sd_bus_open_user_machine(): Don't shortcut without necessary env
daandemeyer Mar 17, 2025
e66658a
initctl: fix error handling
yuwata Mar 18, 2025
737e173
sd-varlink: fix overwrite of loop count
yuwata Mar 18, 2025
4c29b9b
cgroup: whenever we migrate a PID to a unit, explicitly drop unit fro…
poettering Mar 19, 2025
5efe6b5
TEST-73-LOCALE: do not unnecessarily restart systemd-localed
yuwata Mar 13, 2025
a53997e
core: fix C type handler for ExitCode property
poettering Mar 21, 2025
3c725b9
core: not sure why but TTYRows/TTYColumns property is 16bit towards o…
poettering Mar 21, 2025
06a6a67
man/timedatectl: add reference to systemd.time(7)
yuwata Mar 24, 2025
77d20e1
man: fix typo in org.freedesktop.systemd1.xml
bluca Mar 24, 2025
cd3e41d
man/systemd-remount-fs: fix grammar
keszybz Mar 24, 2025
ff50506
man/systed.swap: update description of implicit deps
keszybz Mar 25, 2025
81cb18e
homed: don't log error we don't have
poettering Mar 31, 2025
2e192c6
udev: update log messages
yuwata Apr 1, 2025
e7cf976
test: pass verbose option to nvme-cli
bluca Mar 31, 2025
c9a3ac2
test: replace deprecated --hostid= with --hostnqn=
yuwata Apr 1, 2025
8b0d9ea
test: skip TEST-75-RESOLVED if resolved is disabled at build time
bluca Mar 29, 2025
ed008e5
test: skip networkd tests if networkd/resolved are disabled at build …
bluca Mar 29, 2025
75ecac8
test-sd-device: limit the number of iterations when testing device pa…
keszybz Apr 10, 2025
9356469
core/exec-invoke: never override acquired user cred with fallback one
YHNdnzj Apr 8, 2025
f7c3a73
test: switch to new config keyword for bind9 >= 9.21
bluca Apr 7, 2025
a20f1f2
fstab-generator: drop assertions for mount opts
YHNdnzj Jan 25, 2024
5491912
fstab-generator: fix options in systemd.mount-extra= arg
jlamur Apr 7, 2025
19d6469
shared/calendarspec: fix normalization when DST is negative
kmeaw Mar 30, 2025
934388d
locale-util: fix argument for munmap()
yuwata Apr 11, 2025
83f371e
shutdown: handle gracefully if a device disappears while we detach it
poettering Apr 17, 2025
fe38ad9
docs/MEMORY_PRESSURE: Replace incorrect "packages" with correct "pages"
AlexanderKurtz Apr 20, 2025
20aee7c
man/sd_bus_emit_signal: Fix extra const for strv functions
igo95862 Apr 20, 2025
4723dfb
man/systemctl: list-sockets command sorts the result
yuwata Apr 20, 2025
da4e0ce
man/systemd: fix mapping from SysV runlevel to actual target name
yuwata Apr 21, 2025
dbb2761
test-specifier: replace /dev/initctl with /dev/fd
yuwata Apr 22, 2025
b9177cf
man/sd_bus_slot_set_floating: Improve wording around b parameter
JesperNilsson11 Apr 26, 2025
294d741
basic/time-util: fix error handling of clock_nanosleep()
dvdhrm Apr 28, 2025
d48c841
sd-daemon: add fd array size safety check to sd_notify_with_fds()
poettering Nov 4, 2024
aa5f3ab
sd-varlink: refuse accepting more than 253 fds to send along with a V…
poettering Apr 25, 2025
591409e
man/network: clarify SR-IOV section description and usage
tim-seoss Apr 27, 2025
dbabd0d
busctl: validate argvs on get-property/set-property too
bluca Apr 30, 2025
3a8b529
man/network: Note .link early boot caveat, and .network .netdev usage.
tim-seoss May 2, 2025
19528ba
man/systemctl: add preposition for clarity
geochip May 5, 2025
e1496eb
meson: Ensure that distribution packages own systemenvgeneratordir
debarshiray May 2, 2025
3c9a4be
man/systemd.exec: reword description of SystemCallFilter=
keszybz May 6, 2025
1c21e05
man/systemd.exec: reword description of RestrictAddressFamilies=
keszybz May 6, 2025
1272e7f
flush_ports: flush POSIX message queues properly
millert May 6, 2025
2af207a
log: fix declaration of log_dispatch_internal()
aafeijoo-suse May 12, 2025
c3d8fb6
shell-completion: fix completion of `systemctl --user unset-environme…
e-kwsm May 13, 2025
c6c219b
man: add missing fdstore in systemctl clean --what documentation
behrmann May 13, 2025
2d8cdb3
man: note for systemctl clean --what that commas separate values
behrmann May 13, 2025
283754d
systemct: show all in output of systemctl clean --what=help
behrmann May 13, 2025
65ad04c
man: reword the description of "secure pager" handling
keszybz May 6, 2025
92b660f
man: rework the description of $SYSTEMD_PAGER and $PAGER
keszybz May 6, 2025
842f10c
pager: also check for $SUDO_UID
keszybz May 6, 2025
cf0b300
CI: undo mkosi.yml overwrite of systemd tools from main
bluca May 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/mkosi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ jobs:

- name: Configure
run: |
# mkosi GHA clones and builds from main but tools are not compatible with this branch, 24.04 ships 255 which is enough
sudo apt install --reinstall systemd systemd-container systemd-boot systemd-ukify

tee mkosi.local.conf <<- EOF
[Distribution]
Distribution=${{ matrix.distro }}
Expand Down Expand Up @@ -128,8 +131,6 @@ jobs:
ExecStart=false
EOF
cp mkosi.images/initrd/mkosi.extra/usr/lib/systemd/system/emergency.service.d/poweroff.conf mkosi.images/system/mkosi.extra/usr/lib/systemd/system/emergency.service.d/poweroff.conf
sudo ln -svf "$(dirname "$(readlink /usr/bin/bootctl)")/systemd-keyutil" /usr/lib/systemd/systemd-keyutil
/usr/lib/systemd/systemd-keyutil --version

- name: Generate secure boot key
run: mkosi --debug genkey
Expand Down
2 changes: 1 addition & 1 deletion docs/MEMORY_PRESSURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ it can attempt various things to make more memory available again ("reclaim"):
pages are the many memory mapped executable files and shared libraries on
disk, among others.

* The kernel can flush out memory packages not backed by files on disk
* The kernel can flush out memory pages not backed by files on disk
("anonymous" memory, i.e. memory allocated via `malloc()` and similar calls,
or `tmpfs` file system contents) if there's swap to write it to.

Expand Down
86 changes: 58 additions & 28 deletions man/common-variables.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,22 @@

<varlistentry id='pager'>
<term><varname>$SYSTEMD_PAGER</varname></term>
<term><varname>$PAGER</varname></term>

<listitem><para>Pager to use when <option>--no-pager</option> is not given; overrides
<varname>$PAGER</varname>. If neither <varname>$SYSTEMD_PAGER</varname> nor <varname>$PAGER</varname> are set, a
set of well-known pager implementations are tried in turn, including
<citerefentry project='man-pages'><refentrytitle>less</refentrytitle><manvolnum>1</manvolnum></citerefentry> and
<citerefentry project='man-pages'><refentrytitle>more</refentrytitle><manvolnum>1</manvolnum></citerefentry>, until one is found. If
no pager implementation is discovered no pager is invoked. Setting this environment variable to an empty string
or the value <literal>cat</literal> is equivalent to passing <option>--no-pager</option>.</para>
<listitem><para>Pager to use when <option>--no-pager</option> is not given.
<varname>$SYSTEMD_PAGER</varname> is used if set; otherwise <varname>$PAGER</varname> is used.
If neither <varname>$SYSTEMD_PAGER</varname> nor <varname>$PAGER</varname> are set, a set of well-known
pager implementations is tried in turn, including
<citerefentry project='man-pages'><refentrytitle>less</refentrytitle><manvolnum>1</manvolnum></citerefentry>
and
<citerefentry project='man-pages'><refentrytitle>more</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
until one is found. If no pager implementation is discovered, no pager is invoked. Setting those
environment variables to an empty string or the value <literal>cat</literal> is equivalent to passing
<option>--no-pager</option>.</para>

<para>Note: if <varname>$SYSTEMD_PAGERSECURE</varname> is not set, <varname>$SYSTEMD_PAGER</varname>
(as well as <varname>$PAGER</varname>) will be silently ignored.</para></listitem>
and <varname>$PAGER</varname> can only be used to disable the pager (with <literal>cat</literal> or
<literal></literal>), and are otherwise ignored.</para></listitem>
</varlistentry>

<varlistentry id='less'>
Expand Down Expand Up @@ -158,28 +163,53 @@
<varlistentry id='lesssecure'>
<term><varname>$SYSTEMD_PAGERSECURE</varname></term>

<listitem><para>Takes a boolean argument. When true, the "secure" mode of the pager is enabled; if
false, disabled. If <varname>$SYSTEMD_PAGERSECURE</varname> is not set at all, secure mode is enabled
if the effective UID is not the same as the owner of the login session, see
<citerefentry project='man-pages'><refentrytitle>geteuid</refentrytitle><manvolnum>2</manvolnum></citerefentry>
and <citerefentry><refentrytitle>sd_pid_get_owner_uid</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
In secure mode, <option>LESSSECURE=1</option> will be set when invoking the pager, and the pager shall
disable commands that open or create new files or start new subprocesses. When
<varname>$SYSTEMD_PAGERSECURE</varname> is not set at all, pagers which are not known to implement
secure mode will not be used. (Currently only
<citerefentry project='man-pages'><refentrytitle>less</refentrytitle><manvolnum>1</manvolnum></citerefentry>
implements secure mode.)</para>

<para>Note: when commands are invoked with elevated privileges, for example under <citerefentry
<listitem>
<para>Common pager commands like <citerefentry
project='man-pages'><refentrytitle>less</refentrytitle><manvolnum>1</manvolnum></citerefentry>, in
addition to "paging", i.e. scrolling through the output, support opening of or writing to other files
and running arbitrary shell commands. When commands are invoked with elevated privileges, for example
under <citerefentry
project='man-pages'><refentrytitle>sudo</refentrytitle><manvolnum>8</manvolnum></citerefentry> or
<citerefentry
project='die-net'><refentrytitle>pkexec</refentrytitle><manvolnum>1</manvolnum></citerefentry>, care
must be taken to ensure that unintended interactive features are not enabled. "Secure" mode for the
pager may be enabled automatically as describe above. Setting <varname>SYSTEMD_PAGERSECURE=0</varname>
or not removing it from the inherited environment allows the user to invoke arbitrary commands. Note
that if the <varname>$SYSTEMD_PAGER</varname> or <varname>$PAGER</varname> variables are to be
honoured, <varname>$SYSTEMD_PAGERSECURE</varname> must be set too. It might be reasonable to completely
disable the pager using <option>--no-pager</option> instead.</para></listitem>
project='die-net'><refentrytitle>pkexec</refentrytitle><manvolnum>1</manvolnum></citerefentry>, the
pager becomes a security boundary. Care must be taken that only programs with strictly limited
functionality are used as pagers, and unintended interactive features like opening or creation of new
files or starting of subprocesses are not allowed. "Secure mode" for the pager may be enabled as
described below, <emphasis>if the pager supports that</emphasis> (most pagers are not written in a way
that takes this into consideration). It is recommended to either explicitly enable "secure mode" or to
completely disable the pager using <option>--no-pager</option> or <varname>PAGER=cat</varname> when
allowing untrusted users to execute commands with elevated privileges.</para>

<para>This option takes a boolean argument. When set to true, the "secure mode" of the pager is
enabled. In "secure mode", <option>LESSSECURE=1</option> will be set when invoking the pager, which
instructs the pager to disable commands that open or create new files or start new subprocesses.
Currently only <citerefentry
project='man-pages'><refentrytitle>less</refentrytitle><manvolnum>1</manvolnum></citerefentry> is known
to understand this variable and implement "secure mode".</para>

<para>When set to false, no limitation is placed on the pager. Setting
<varname>SYSTEMD_PAGERSECURE=0</varname> or not removing it from the inherited environment may allow
the user to invoke arbitrary commands.</para>

<para>When <varname>$SYSTEMD_PAGERSECURE</varname> is not set, systemd tools attempt to automatically
figure out if "secure mode" should be enabled and whether the pager supports it. "Secure mode" is
enabled if the effective UID is not the same as the owner of the login session, see
<citerefentry project='man-pages'><refentrytitle>geteuid</refentrytitle><manvolnum>2</manvolnum></citerefentry>
and
<citerefentry><refentrytitle>sd_pid_get_owner_uid</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
or when running under
<citerefentry><refentrytitle>sudo</refentrytitle><manvolnum>8</manvolnum></citerefentry> or similar
tools (<varname>$SUDO_UID</varname> is set <footnote>
<para>It is recommended for other tools to set and check <varname>$SUDO_UID</varname> as appropriate,
treating it is a common interface.</para></footnote>). In those cases,
<varname>SYSTEMD_PAGERSECURE=1</varname> will be set and pagers which are not known to implement
"secure mode" will not be used at all. Note that this autodetection only covers the most common
mechanisms to elevate privileges and is intended as convenience. It is recommended to explicitly set
<varname>$SYSTEMD_PAGERSECURE</varname> or disable the pager.</para>

<para>Note that if the <varname>$SYSTEMD_PAGER</varname> or <varname>$PAGER</varname> variables are to
be honoured, other than to disable the pager, <varname>$SYSTEMD_PAGERSECURE</varname> must be set
too.</para></listitem>
</varlistentry>

<varlistentry id='colors'>
Expand Down
2 changes: 1 addition & 1 deletion man/org.freedesktop.systemd1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8658,7 +8658,7 @@ node /org/freedesktop/systemd1/unit/systemd_2dtmpfiles_2dclean_2etimer {
elapsation point on the <constant>CLOCK_REALTIME</constant> clock, relative to its epoch.</para>

<para><varname>NextElapseUSecRealtime</varname> contains the next elapsation point on the
<constant>CLOCK_REALTIME</constant> clock in miscroseconds since the epoch, or 0 if this timer event
<constant>CLOCK_REALTIME</constant> clock in microseconds since the epoch, or 0 if this timer event
does not include at least one calendar event.</para>

<para>Similarly, <varname>NextElapseUSecMonotonic</varname> contains the next elapsation point on the
Expand Down
6 changes: 3 additions & 3 deletions man/sd_bus_emit_signal.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
<funcdef>int <function>sd_bus_emit_interfaces_added_strv</function></funcdef>
<paramdef>sd_bus *<parameter>bus</parameter></paramdef>
<paramdef>const char *<parameter>path</parameter></paramdef>
<paramdef>const char **<parameter>interfaces</parameter></paramdef>
<paramdef>char **<parameter>interfaces</parameter></paramdef>
</funcprototype>

<funcprototype>
Expand All @@ -106,7 +106,7 @@
<funcdef>int <function>sd_bus_emit_interfaces_removed_strv</function></funcdef>
<paramdef>sd_bus *<parameter>bus</parameter></paramdef>
<paramdef>const char *<parameter>path</parameter></paramdef>
<paramdef>const char **<parameter>interfaces</parameter></paramdef>
<paramdef>char **<parameter>interfaces</parameter></paramdef>
</funcprototype>

<funcprototype>
Expand All @@ -123,7 +123,7 @@
<paramdef>sd_bus *<parameter>bus</parameter></paramdef>
<paramdef>const char *<parameter>path</parameter></paramdef>
<paramdef>const char *<parameter>interface</parameter></paramdef>
<paramdef>const char **<parameter>names</parameter></paramdef>
<paramdef>char **<parameter>names</parameter></paramdef>
</funcprototype>

<funcprototype>
Expand Down
4 changes: 2 additions & 2 deletions man/sd_bus_slot_set_floating.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
referenced bus slot object around. The floating state hence controls the direction of referencing between the bus
object and the bus slot objects: if floating the bus pins the bus slot, and otherwise the bus slot pins the bus
objects. Use <function>sd_bus_slot_set_floating()</function> to switch between both modes: if the
<parameter>b</parameter> parameter is zero, the slot object is considered floating, otherwise it is made a regular
(non-floating) slot object.</para>
<parameter>b</parameter> parameter is zero, the slot object is made into a regular (non-floating) slot object,
otherwise it is made into a floating slot object.</para>

<para>Bus slot objects may be allocated with calls such as
<citerefentry><refentrytitle>sd_bus_add_match</refentrytitle><manvolnum>3</manvolnum></citerefentry>. If the
Expand Down
20 changes: 20 additions & 0 deletions man/sd_notify.xml
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,26 @@
successfully. Specifically, no error is returned when a file descriptor is attempted to be stored using
<varname>FDSTORE=1</varname> but the service is not actually configured to permit storing of file
descriptors (see above).</para>

<refsect2 id='errors'>
<title>Errors</title>

<para>Returned errors may indicate the following problems:</para>

<variablelist>
<varlistentry>
<term><constant>-E2BIG</constant></term>

<listitem><para>More file descriptors passed at once than the system allows. On Linux the number of
file descriptors that may be passed across <constant>AF_UNIX</constant> sockets at once is 253, see
<citerefentry
project='man-pages'><refentrytitle>unix</refentrytitle><manvolnum>7</manvolnum></citerefentry> for
details.</para>

</listitem>
</varlistentry>
</variablelist>
</refsect2>
</refsect1>

<refsect1>
Expand Down
12 changes: 6 additions & 6 deletions man/systemctl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,9 @@ PATH CONDITION UNIT
shown. Produces output similar to
<programlisting>
LISTEN UNIT ACTIVATES
/dev/initctl systemd-initctl.socket systemd-initctl.service
[::]:22 sshd.socket sshd.service
kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
/dev/rfkill systemd-rfkill.socket systemd-rfkill.service

5 sockets listed.</programlisting>
Note: because the addresses might contains spaces, this output
Expand Down Expand Up @@ -555,7 +554,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err
<term><command>clean <replaceable>PATTERN</replaceable>…</command></term>

<listitem>
<para>Remove the configuration, state, cache, logs or runtime data of the specified units. Use
<para>Remove the configuration, state, cache, logs, runtime or file descriptor store data of the specified units. Use
<option>--what=</option> to select which kind of resource to remove. For service units this may
be used to remove the directories configured with <varname>ConfigurationDirectory=</varname>,
<varname>StateDirectory=</varname>, <varname>CacheDirectory=</varname>,
Expand All @@ -570,7 +569,8 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err
command only applies to units that use either of these settings. If <option>--what=</option> is
not specified, the cache and runtime data as well as the file descriptor store are removed (as
these three types of resources are generally redundant and reproducible on the next invocation of
the unit). Note that the specified units must be stopped to invoke this operation.</para>
the unit). Multiple values can be seperated by commas. Note that the specified units must be stopped
to invoke this operation.</para>

<xi:include href="version-info.xml" xpointer="v243"/>
</listitem>
Expand Down Expand Up @@ -939,7 +939,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err
<term><command>preset <replaceable>UNIT</replaceable>…</command></term>

<listitem>
<para>Reset the enable/disable status one or more unit files, as specified on
<para>Reset the enable/disable status of one or more unit files, as specified on
the command line, to the defaults configured in the preset policy files. This
has the same effect as <command>disable</command> or
<command>enable</command>, depending how the unit is listed in the preset
Expand Down
24 changes: 14 additions & 10 deletions man/systemd-networkd.service.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,16 @@
manages networks. It detects and configures network devices as
they appear, as well as creating virtual network devices.</para>

<para>To configure low-level link settings independently of
networks, see
<citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>

<para><command>systemd-networkd</command> will create network devices based
on the configuration in
<para>Certain low-level settings of physical network devices (e.g. device
names and altnames) as well as the creation of SR-IOV virtual functions on
physical network interfaces may be managed by
<citerefentry><refentrytitle>systemd-udevd</refentrytitle><manvolnum>8</manvolnum></citerefentry>
according to the contents of
<citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>
files.</para>

<para><command>systemd-networkd</command> will create "virtual" network
devices (e.g. bridges and tunnels) based on the configuration in
<citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>
files, respecting the [Match] sections in those files.</para>

Expand All @@ -47,10 +51,10 @@
with an appropriate [Match] section, see
<citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
For those links, it will flush existing network addresses and routes when
bringing up the device. Any links not matched by one of the
<filename>.network</filename> files will be ignored. It is also possible to
explicitly tell <filename>systemd-networkd</filename> to ignore a link by
using <varname>Unmanaged=yes</varname> option, see
bringing up the device (except when directed not to). Any links not matched
by one of the <filename>.network</filename> files will be ignored. It is
also possible to explicitly tell <filename>systemd-networkd</filename> to
ignore a link by using the <varname>Unmanaged=yes</varname> option, see
<citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
</para>

Expand Down
2 changes: 1 addition & 1 deletion man/systemd-remount-fs.service.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<para>Note: <filename>systemd-remount-fs.service</filename> is usually pulled in by
<citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
hence it is also affected by the kernel command line option <varname>fstab=</varname>, which may be used
to disable the generator. It may also pulled in by
to disable the generator. It may also be pulled in by
<citerefentry><refentrytitle>systemd-gpt-auto-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
which is affected by <varname>systemd.gpt_auto</varname> and other options.</para>
</refsect1>
Expand Down
Loading
Loading