]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
5 months agocoredump: wrap long lines, fix grammar in comments 37559/head
Zbigniew Jędrzejewski-Szmek [Wed, 21 May 2025 20:33:50 +0000 (22:33 +0200)] 
coredump: wrap long lines, fix grammar in comments

5 months agocoredump: restore compatibility with older patterns
Zbigniew Jędrzejewski-Szmek [Tue, 29 Apr 2025 12:47:59 +0000 (14:47 +0200)] 
coredump: restore compatibility with older patterns

This was broken in f45b8015513d38ee5f7cc361db9c5b88c9aae704. Unfortunately
the review does not talk about backward compatibility at all. There are
two places where it matters:
- During upgrades, the replacement of kernel.core_pattern is asynchronous.
  For example, during rpm upgrades, it would be updated a post-transaction
  file trigger. In other scenarios, the update might only happen after
  reboot. We have a potentially long window where the old pattern is in
  place. We need to capture coredumps during upgrades too.
- With --backtrace. The interface of --backtrace, in hindsight, is not
  great. But there are users of --backtrace which were written to use
  a specific set of arguments, and we can't just break compatiblity.
  One example is systemd-coredump-python, but there are also reports of
  users using --backtrace to generate coredump logs.

Thus, we require the original set of args, and will use the additional args if
found.

A test is added to verify that --backtrace works with and without the optional
args.

5 months agonetworkd: add test to ensure that untracked addresses are kept
Matteo Croce [Mon, 19 May 2025 03:46:50 +0000 (05:46 +0200)] 
networkd: add test to ensure that untracked addresses are kept

Users can alter the network configuration manually, but networkd should
not interfere with manually set addresses and routes.

5 months agoVarious meson improvements (#37510)
Daan De Meyer [Tue, 20 May 2025 11:44:33 +0000 (13:44 +0200)] 
Various meson improvements (#37510)

5 months agocore: Also refresh confext extensions when reloading notify-reload service (#33995)
Luca Boccassi [Tue, 20 May 2025 10:27:34 +0000 (11:27 +0100)] 
core: Also refresh confext extensions when reloading notify-reload service (#33995)

`ExtensionImages=` and `ExtensionDirectories=` now let you specify
vpick-named extensions; however, since they just get set up once when
the service is started, you can't see newer versions without restarting
the service entirely. Here, also reload confext extensions when you
reload a service. This allows you to deploy a new version of some
configuration and have it picked up at reload time without interruption
to your workload.

Right now, we would only reload confext extensions and leave the sysext
ones behind, since it didn't seem prudent to swap out what is likely
program code at reload. This is made possible by only going for the
`SYSTEMD_CONFEXT_HIERARCHIES` overlays (which only contains `/etc`).

This PR:
- Adjusts `service.c` to also refresh extensions when needed.
- Adds integration tests to check that a confext reload actually
occurred.
- Adds to the `systemd.exec` man pages to document this behavior.

This is a follow up to #24864 and #31364. Thank you to @bluca and
@goenkam for help in getting this up.

5 months agomkosi: update debian commit reference to b0bbe045f41789845ecf591fd29f50c564034104
Luca Boccassi [Mon, 19 May 2025 15:08:29 +0000 (16:08 +0100)] 
mkosi: update debian commit reference to b0bbe045f41789845ecf591fd29f50c564034104

b0bbe045f4 systemd-boot: fix manpages installation
db46ebd2ec Install new files for upstream build
648bfbad0b systemd-homed: add dependency on polkitd
5a5f1bd5a3 document requirement to sync *.link files with initrd
1f2b663871 d/README.Debian: update some outdated paragraphs
03e6ab9c93 Add version to systemd-boot-efi-signed virtual package
5d7a08916c d/control: bump Standards-Version to 4.7.2, no changes
ace9e4beaf d/signing-template/copyright: use GPL URL instead of old FSF postal address

5 months agocore/cgroup: also assume cgroup.events frozen attr is available (#37518)
Mike Yuan [Tue, 20 May 2025 08:58:53 +0000 (10:58 +0200)] 
core/cgroup: also assume cgroup.events frozen attr is available (#37518)

5 months agomeson: Use hyphens everywhere in gperf.c filenames 37510/head
Daan De Meyer [Tue, 20 May 2025 08:46:28 +0000 (10:46 +0200)] 
meson: Use hyphens everywhere in gperf.c filenames

5 months agomeson: Rework clang-tidy integration to be done via unit tests
Daan De Meyer [Thu, 15 May 2025 13:09:27 +0000 (15:09 +0200)] 
meson: Rework clang-tidy integration to be done via unit tests

Instead of using run-clang-tidy.py with its own scheduling, let's
just gather a list of source files ourselves and then use that to
add a unit test for each source file that runs clang-tidy on the
source file.

We also add a bit of logic to run clang-tidy on most header files
as well for extra coverage. This uncovered various header files that
were not standalone so this commit also includes fixes to make sure
the clang-tidy tests are all green.

We can also use this in a later commit to run clang-include-cleaner
on each source file in the same way.

5 months agotree-wide: Ensure source file names are unique
Daan De Meyer [Thu, 15 May 2025 12:07:59 +0000 (14:07 +0200)] 
tree-wide: Ensure source file names are unique

Let's ensure all of our source file names are unique without having
to take the directory into account.

This allows us to create meson targets or unit tests identified by the
the name of the source file they operate on without having to include
the full path of the source file in the target or test name to avoid
conflicts.

5 months agomeson: Build fuzz executables by default if fuzz-tests option is enabled
Daan De Meyer [Thu, 15 May 2025 12:52:48 +0000 (14:52 +0200)] 
meson: Build fuzz executables by default if fuzz-tests option is enabled

fuzz-tests is enabled by default now but we still don't build the fuzz
executables by default. Let's change that so that we always make sure these
still compile when we make changes.

5 months agooss-fuzz: Add comment on why we build with --auto-features=disabled
Daan De Meyer [Mon, 19 May 2025 15:43:48 +0000 (17:43 +0200)] 
oss-fuzz: Add comment on why we build with --auto-features=disabled

5 months agomeson: Make sure fuzz-journal-remote is built in oss-fuzz
Daan De Meyer [Mon, 19 May 2025 15:41:18 +0000 (17:41 +0200)] 
meson: Make sure fuzz-journal-remote is built in oss-fuzz

oss-fuzz builds with --auto-features=disabled, yet we have to make
sure all fuzzers are still built when --auto-features=disabled, so
let's always build systemd-journal-remote even if it is disabled so
that we can use its objects to build fuzz-journal-remote. Instead,
when remote=disabled, we make sure we don't installed
systemd-journal-remote.

5 months agomeson: Extract more objects instead of compiling multiple times
Daan De Meyer [Thu, 15 May 2025 12:16:57 +0000 (14:16 +0200)] 
meson: Extract more objects instead of compiling multiple times

Also, let's deflatten the lists of sources in preparation for the
next commit at the same time.

In systemctl, we split out systemctl-main.c to make sure the definition
of main() is in a separate object which allows us to extract the systemctl.c
object and link it in the fuzzer target without getting a multiple definition
error when linking.

5 months agojournal-remote: Allow building without microhttpd support
Daan De Meyer [Thu, 15 May 2025 11:23:54 +0000 (13:23 +0200)] 
journal-remote: Allow building without microhttpd support

systemd-journal-remote is useful even if the microhttpd related features
are not enabled so let's not skip it entirely if microhttpd is not available.

5 months agocgroup-util: modernize cg_get_keyed_attribute() 37518/head
Mike Yuan [Mon, 19 May 2025 19:06:17 +0000 (21:06 +0200)] 
cgroup-util: modernize cg_get_keyed_attribute()

- assert on supplied keys being unique
- Reject duplicate attributes with -EBADMSG
- Rename 'ret_values' to just 'values', given we don't
  allocate the array
- Remove now unused cg_get_keyed_attribute_graceful()

5 months agocore/cgroup: also assume cgroup.events frozen attr is available
Mike Yuan [Mon, 19 May 2025 16:41:29 +0000 (18:41 +0200)] 
core/cgroup: also assume cgroup.events frozen attr is available

Follow-up for 3c86a935ad2f88a83f1f465544cb0c8bdc288f4c

5 months agoboot: fix ia32 build with clang
Zbigniew Jędrzejewski-Szmek [Mon, 19 May 2025 11:37:43 +0000 (13:37 +0200)] 
boot: fix ia32 build with clang

After 668d915a4bea202e739a9bd3f895c7269f320659, the build fails:
[7/14] Linking target src/boot/systemd-bootia32.elf
FAILED: src/boot/systemd-bootia32.elf
clang  -o src/boot/systemd-bootia32.elf src/boot/systemd-bootia32.elf.p/boot.c.o src/boot/systemd-bootia32.elf.p/line-edit.c.o src/boot/systemd-bootia32.elf.p/bcd.c.o -Wl,--as-needed -Wl,--no-undefined -pie -fstack-protector src/boot/libefiia32.a -nostdlib -static-pie -Wl,--entry=efi_main -Wl,--fatal-warnings -Wl,-static,-pie,--no-dynamic-linker,-z,text -z common-page-size=4096 -z max-page-size=4096 -z noexecstack -z relro -z separate-code -Wl,-z,nopack-relative-relocs -fcf-protection=none -fno-asynchronous-unwind-tables -fno-exceptions -fno-unwind-tables -fno-sanitize=all -Wno-unused-command-line-argument -m32
/usr/sbin/ld: src/boot/libefiia32.a.p/console.c.o: in function `console_set_mode':
/home/zbyszek/src/systemd-work/build-clang/../src/boot/console.c:267:(.text+0xb8f): undefined reference to `__moddi3'
/usr/sbin/ld: src/boot/libefiia32.a.p/console.c.o: in function `get_auto_mode':
/home/zbyszek/src/systemd-work/build-clang/../src/boot/console.c:228:(.text+0xf18): undefined reference to `__udivdi3'
/usr/sbin/ld: src/boot/libefiia32.a.p/efi-string.c.o: in function `push_num':
/home/zbyszek/src/systemd-work/build-clang/../src/boot/efi-string.c:695:(.text+0x3c1a): undefined reference to `__moddi3'
/usr/sbin/ld: /home/zbyszek/src/systemd-work/build-clang/../src/boot/efi-string.c:696:(.text+0x3c54): undefined reference to `__divdi3'
/usr/sbin/ld: /home/zbyszek/src/systemd-work/build-clang/../src/boot/efi-string.c:702:(.text+0x3cda): undefined reference to `__umoddi3'
/usr/sbin/ld: /home/zbyszek/src/systemd-work/build-clang/../src/boot/efi-string.c:703:(.text+0x3d0a): undefined reference to `__udivdi3'
/usr/sbin/ld: src/boot/libefiia32.a.p/ticks.c.o: in function `time_usec':
/home/zbyszek/src/systemd-work/build-clang/../src/boot/ticks.c:110:(.text+0x9d): undefined reference to `__udivdi3'
/usr/sbin/ld: src/boot/libefiia32.a.p/ticks.c.o: in function `ticks_freq_arch':
/home/zbyszek/src/systemd-work/build-clang/../src/boot/ticks.c:46:(.text+0x394): undefined reference to `__udivdi3'
/usr/sbin/ld: /home/zbyszek/src/systemd-work/build-clang/../src/boot/ticks.c:49:(.text+0x3ce): undefined reference to `__udivdi3'
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Restore the use of -lgcc for 32-bit builds.

(FWIW, neither --rtlib=compiler-rt nor --rtlib=libgcc help.)

5 months agosd-varlink: Expose sd_varlink_idl_parse() (#37513)
Daan De Meyer [Mon, 19 May 2025 14:13:44 +0000 (16:13 +0200)] 
sd-varlink: Expose sd_varlink_idl_parse() (#37513)

5 months agosd-varlink: Expose sd_varlink_idl_parse() 37513/head
Daan De Meyer [Mon, 19 May 2025 12:49:43 +0000 (14:49 +0200)] 
sd-varlink: Expose sd_varlink_idl_parse()

We're planning to do code generation based on the systemd varlink
APIs. To simplify this, let's expose the IDL parser, so we can use
it to do code generation instead of having to write our own IDL
parser.

5 months agosd-varlink: Fix argument names of sd_varlink_idl_parse()
Daan De Meyer [Mon, 19 May 2025 13:07:34 +0000 (15:07 +0200)] 
sd-varlink: Fix argument names of sd_varlink_idl_parse()

5 months agoman: document confext reload behavior for ExtensionDirectories/Images 33995/head
maia x. [Thu, 22 Aug 2024 20:34:34 +0000 (13:34 -0700)] 
man: document confext reload behavior for ExtensionDirectories/Images

5 months agotest: check reloading notify-reload service refreshes vpick extensions
maia x. [Mon, 6 Jan 2025 18:41:19 +0000 (10:41 -0800)] 
test: check reloading notify-reload service refreshes vpick extensions

In TEST-50-DISSECT.dissect, this adds the following cases:
- testservice-50g: vpick extension in ExtensionDirectories
- testservice-50h: vpick extension in ExtensionImages
- testservice-50i: ExtensionDirectories + RootImage
- testservice-50j: ExtensionDirectories + RootDirectory

5 months agocore: reload confexts when reloading notify-reload services
maia x. [Mon, 6 Jan 2025 18:31:44 +0000 (10:31 -0800)] 
core: reload confexts when reloading notify-reload services

`ExtensionImages=` and `ExtensionDirectories=` now let you specify
vpick-named extensions; however, since they just get set up once when
the service is started, you can't see newer versions without restarting
the service entirely.  Here, also reload confext extensions when you
reload a service. This allows you to deploy a new version of some
configuration and have it picked up at reload time without interruption
to your workload.

Right now, we would only reload confext extensions and leave the sysext
ones behind, since it didn't seem prudent to swap out what is likely
program code at reload. This is made possible by only going for the
`SYSTEMD_CONFEXT_HIERARCHIES` overlays (which only contains `/etc`).

Implementation wise, this uses the new kernel API and two collaborating
child processes under the host & child namespaces in order to gather the
right FDs needed:

  - (1) In child, set up the extension images and directories in a slave
mountns, and obtain their FDs.
  - (2) Fork into a grandchild under target process namespace, and do a
        "fake" unmount to obtain the FD of the underlying target folder
say /etc).
  - (3) In the child again, set up new overlay under host NS rights.

We do not want to do I/O heavy jobs inline in PID1 blocking the state
machine, so add separate async states to handle this case.

Co-authored-by: Luca Boccassi <luca.boccassi@gmail.com>
5 months agocore/manager: do not pop gc_unit_queue before unit_gc_sweep()
Mike Yuan [Sat, 17 May 2025 14:59:32 +0000 (16:59 +0200)] 
core/manager: do not pop gc_unit_queue before unit_gc_sweep()

Follow-up for 52e3671bf7e6321c58c6d3a6c8ad8e167259a569

unit_gc_sweep() might try to add the unit to gc queue again.
While that becomes no-op as Unit.in_gc_queue is not cleared
yet, it induces minor inconsistency of states.

5 months agounits: kill only udev services and keep udev sockets on switching root
Yu Watanabe [Tue, 13 May 2025 17:56:21 +0000 (02:56 +0900)] 
units: kill only udev services and keep udev sockets on switching root

This also makes initrd-cleanup.service explicitly start
initrd-switch-root.service with replace-irreversibly mode, to avoid
systemd-udevd.service being triggered by kernel events and the start
job of initrd-switch-root.service being cancelled.

Follow-ups for 676fb42aaec60281651368f083abb3cbaf3c7dc2.
Addresses https://github.com/systemd/systemd/pull/37374#issuecomment-2875990471.

5 months agoterminal-util: restore terminal settings if fd_reopen() fails
Mike Yuan [Fri, 16 May 2025 19:50:29 +0000 (21:50 +0200)] 
terminal-util: restore terminal settings if fd_reopen() fails

Follow-up for a0c314d6b04c0a20d566b15c759d18cdb2916c14

5 months agosd-bus: drop a bunch of 'else'
Lennart Poettering [Fri, 16 May 2025 07:55:17 +0000 (09:55 +0200)] 
sd-bus: drop a bunch of 'else'

With the new US taxes on bits and bytes let's reduce our footprint a
bit.

5 months agoRemove overzealous checks (#37493)
Yu Watanabe [Fri, 16 May 2025 16:37:18 +0000 (01:37 +0900)] 
Remove overzealous checks (#37493)

5 months agobasic/terminal-util: simplify output param handling 37493/head
Zbigniew Jędrzejewski-Szmek [Fri, 16 May 2025 13:24:12 +0000 (15:24 +0200)] 
basic/terminal-util: simplify output param handling

Those static functions were written to support optional output params, but they
are only ever called with the output param set, and it doesn't make sense to
ever call them without the output param. Since those are internal functions,
drop this unused complexity.

5 months agobasic/terminal-util: drop 'U' suffix
Zbigniew Jędrzejewski-Szmek [Thu, 15 May 2025 11:55:11 +0000 (13:55 +0200)] 
basic/terminal-util: drop 'U' suffix

C automatically casts a signed int to unsigned in binary operation with an
unsigned int. Thus that suffix is not useful. Also surrounding code doesn't use
it.

5 months agosrc/boot: assume that intmax_t is the biggest integer
Zbigniew Jędrzejewski-Szmek [Wed, 14 May 2025 20:03:29 +0000 (22:03 +0200)] 
src/boot: assume that intmax_t is the biggest integer

Same as in 81d7934882ae13c64d9b08d365a0baa011cb2fbb, intmax_t by definition is
the widest int. Strictly speaking, the check whether
  sizeof(intmax_t) == sizeof(long long)
in the code below is redundant, but I think it's nicer to keep it for symmetry
with the other cases.

Requested in
https://github.com/systemd/systemd/pull/37442#pullrequestreview-2840906908.

5 months agoTEST-07-PID1: drop journal message flood test
Yu Watanabe [Wed, 14 May 2025 19:02:26 +0000 (04:02 +0900)] 
TEST-07-PID1: drop journal message flood test

This partially reverts f9b186c21aa500eb7da3de0dcbd4cc1f07589a5a.

The test case is unstable, and fills debugging logs after journald
is restarted.

5 months agoman: reword recommendations around Accept=
Lennart Poettering [Thu, 15 May 2025 16:46:03 +0000 (18:46 +0200)] 
man: reword recommendations around Accept=

Accept=yes has very valid usecases (i.e. for sporadically invoked
services) and strong benefits (i.e. better security because connections
can be sandboxed nicely, isolating them). Let's hence reword things and
stop claiming that Accept=yes was a legacy thing, because it really
isn't.

Some other man fixes, too

5 months agocatalog: add more entries
Lennart Poettering [Thu, 15 May 2025 13:24:31 +0000 (15:24 +0200)] 
catalog: add more entries

While message IDs are about more than catalog entries (they make
messages recognizable), I think it makes sense to document at least all
those messages that indicate problems with catalog entries, in an
attempt to be helpful to users.

Fixes: #36201
5 months agoterminal-util: explicitly reset cursor
Lennart Poettering [Thu, 15 May 2025 16:46:06 +0000 (18:46 +0200)] 
terminal-util: explicitly reset cursor

Apparently there are terminals where our usual reset is not enough to
turn the cursor back on. Hence do so explicitly.

Fixes: #22168
5 months agobpf-link: Add HAVE_LIBBPF check
Daan De Meyer [Fri, 16 May 2025 10:36:32 +0000 (12:36 +0200)] 
bpf-link: Add HAVE_LIBBPF check

Fixes compilation error in userns-restrict.c where we try to include
libbpf.h when it is not available.

5 months agohwdb: add missing PLUTO SDR vendor name
AsciiWolf [Fri, 16 May 2025 10:14:36 +0000 (12:14 +0200)] 
hwdb: add missing PLUTO SDR vendor name

5 months agoman/systemctl: fix typo
Yu Watanabe [Fri, 16 May 2025 08:49:05 +0000 (17:49 +0900)] 
man/systemctl: fix typo

Follow-up for 652e4dd7434d1603866c059aa8a67eaf8b73346f.

5 months agovarlink: fix typo
Yu Watanabe [Fri, 16 May 2025 08:47:51 +0000 (17:47 +0900)] 
varlink: fix typo

Follow-up for 736349958efe34089131ca88950e2e5bb391d36a.

5 months agojournalctl: fix typo
Yu Watanabe [Fri, 16 May 2025 08:46:15 +0000 (17:46 +0900)] 
journalctl: fix typo

Follow-up for d2f45c76811219828103a976052e575569a391cb.

5 months agoClean up includes (#37467)
Lennart Poettering [Fri, 16 May 2025 08:07:19 +0000 (10:07 +0200)] 
Clean up includes (#37467)

Split out of #37344

More small components that shouldn't be all too controversial.

5 months agotree-wide: fix use of flink_tmpfile()
Lennart Poettering [Thu, 15 May 2025 10:23:57 +0000 (12:23 +0200)] 
tree-wide: fix use of flink_tmpfile()

Let's always make sure the temporary file returned by fopen_tmpfile()
and friends is removed on failure (via _cleanup_). Conversely, make sure
that once the file is renamed into its final place, we no longer try to
remove the temporary file (since it's not going to exist anymore).

5 months agoshell-completion: improve completion of systemd-tmpfiles
Eisuke Kawashima [Thu, 15 May 2025 22:46:46 +0000 (07:46 +0900)] 
shell-completion: improve completion of systemd-tmpfiles

5 months agoman: document how to hook stuff into system wakeup
Lennart Poettering [Thu, 15 May 2025 12:58:07 +0000 (14:58 +0200)] 
man: document how to hook stuff into system wakeup

Fixes: #6364
5 months agoBugprone argument comment - round 5 (#37481)
Daan De Meyer [Thu, 15 May 2025 18:33:50 +0000 (20:33 +0200)] 
Bugprone argument comment - round 5 (#37481)

5 months agoman: fix path to version.h
Yu Watanabe [Thu, 15 May 2025 13:32:30 +0000 (22:32 +0900)] 
man: fix path to version.h

Follow-up for 30d20907bddfe064cc3437a888dd8f00d14929e4.

5 months agotreewide: correct argument comments 37481/head
Jelle van der Waa [Thu, 15 May 2025 13:39:20 +0000 (15:39 +0200)] 
treewide: correct argument comments

5 months agodiscover-image: correct argument comments
Jelle van der Waa [Thu, 15 May 2025 12:50:33 +0000 (14:50 +0200)] 
discover-image: correct argument comments

5 months agocore: always enable CPU accounting; cgtop: drop cgv1 handling (#37448)
Mike Yuan [Thu, 15 May 2025 12:41:07 +0000 (14:41 +0200)] 
core: always enable CPU accounting; cgtop: drop cgv1 handling (#37448)

5 months agohwdb: add PLUTO SDR (#37471)
Yu Watanabe [Thu, 15 May 2025 11:19:09 +0000 (20:19 +0900)] 
hwdb: add PLUTO SDR (#37471)

The goal of this PR is to replace the rules in
https://github.com/analogdevicesinc/plutosdr-fw/commit/76aa80a6d86f7b3b2c0fe83cca51f351991ee852.

The original rules file have some rules for a device that is now
deprecated and so, are not part of this change. AFAIU, 'plugdev' is also
a thing of the past and we now use 'uaccess' which should be given to
all ID_SOFTWARE_RADIO devices. So yeah, hopefully what I have here is
equivalent to the orginal .rules.

The request for this was done here:
https://github.com/analogdevicesinc/plutosdr-fw/issues/101

5 months agoUpdate hwdb (#37470)
Luca Boccassi [Thu, 15 May 2025 11:09:03 +0000 (12:09 +0100)] 
Update hwdb (#37470)

Update hwdb, even though we are pretty far from a release in order to:
- incrementally test upstream additions to hwdb
- allow backports to stable branches

5 months agocore: use socket cookie for naming per-connection service instances + set $SO_COOKIE...
Luca Boccassi [Thu, 15 May 2025 10:11:21 +0000 (11:11 +0100)] 
core: use socket cookie for naming per-connection service instances + set $SO_COOKIE env var to it (#37469)

5 months agotest: write file from systemd service in transient unit
Tommy Unger [Sat, 19 Apr 2025 01:57:26 +0000 (18:57 -0700)] 
test: write file from systemd service in transient unit

This integration test demonstrates that a containerized systemd instance can
write to a bind mounted file observable to the host. Specifically, the bash
script uses systemd-run to start a systemd instance as a transient unit
container. This systemd-run command bind mounts a directory the container will
share with the host, and runs an internal service which creates and writes to a
file from the container's view of this directory. When finished writing, the
service runs the exit target, terminating the internal systemd instance, and
ending the lifetime of the container.

The script waits for the container to finish running, then verifies that the
expected file contents were written on the host side of the filesystem mount.

This test employs a workaround, creating an unmasked procfs mount on the host
which enables the privileged guest to create its own mounts internally. This
may indicate a systemd bug, as the privileged container should not rely on
the existence of an unmasked procfs on the host in order to mount its own
filesystems internally.

5 months agovarlink: two tweaks for method call handling (#37466)
Lennart Poettering [Thu, 15 May 2025 09:28:58 +0000 (11:28 +0200)] 
varlink: two tweaks for method call handling (#37466)

5 months agotest: correct argument comments
Jelle van der Waa [Thu, 15 May 2025 09:14:04 +0000 (11:14 +0200)] 
test: correct argument comments

5 months agoterminal-util: rename openpt_allocate_* ret_peer argument
Jelle van der Waa [Thu, 15 May 2025 09:10:27 +0000 (11:10 +0200)] 
terminal-util: rename openpt_allocate_* ret_peer argument

Make it consistent with its implementation.

5 months agotpm2-util: correct argument comments
Jelle van der Waa [Thu, 15 May 2025 09:03:41 +0000 (11:03 +0200)] 
tpm2-util: correct argument comments

5 months agosd-varlink: fix argument comment
Jelle van der Waa [Thu, 15 May 2025 09:02:28 +0000 (11:02 +0200)] 
sd-varlink: fix argument comment

Follow-up for 52068c1e9c541038f1d7fd9a3a488feef0dcc35c

5 months agotpm2-util: rename tpm2_unseal arguments
Jelle van der Waa [Thu, 15 May 2025 08:58:52 +0000 (10:58 +0200)] 
tpm2-util: rename tpm2_unseal arguments

To make it consistent with its implementation.

5 months agohwdb: run "update-hwdb-autosuspend" 37470/head
Zbigniew Jędrzejewski-Szmek [Thu, 15 May 2025 08:47:40 +0000 (10:47 +0200)] 
hwdb: run "update-hwdb-autosuspend"

As usual, mostly additions and a few removals.

5 months agohwdb: run "update-hwdb"
Zbigniew Jędrzejewski-Szmek [Thu, 15 May 2025 08:46:26 +0000 (10:46 +0200)] 
hwdb: run "update-hwdb"

As usual, it seems to be mostly additions and corrections.

The last update was in 0d740f4bc0f03b773264ef75eaf1233ffc89c5b2, Dec 10th. I
think it's reasonable to update the hwdb more often. In particular, I want to
push an update to the stable branches, but it should be updated in 'main'
first.

5 months ago hwdb: append ID_MM_DEVICE_IGNORE to hwdb parser 37471/head
Nuno Sá [Thu, 15 May 2025 08:48:30 +0000 (09:48 +0100)] 
 hwdb: append ID_MM_DEVICE_IGNORE to hwdb parser

5 months agohwdb: add Analog Devices PLUTO SDR
Nuno Sá [Thu, 15 May 2025 08:46:16 +0000 (09:46 +0100)] 
hwdb: add Analog Devices PLUTO SDR

Add hwdb entries for ADI PLUTO. Note that when in DFU (Device Firmware
mode) mode, the pid is different. Thus, the two entries.

We also want to make sure that no AT commands are sent to us and so we
set 'ID_MM_DEVICE_IGNORE=1'.

5 months agoupdate TODO 37469/head
Lennart Poettering [Thu, 15 May 2025 07:53:30 +0000 (09:53 +0200)] 
update TODO

5 months agonetwork: do not drop duplicated entries in loop
Yu Watanabe [Wed, 14 May 2025 21:36:55 +0000 (06:36 +0900)] 
network: do not drop duplicated entries in loop

Fixes #37456.

5 months agocore: name socket unit instances after the socket cookie
Lennart Poettering [Thu, 15 May 2025 07:16:22 +0000 (09:16 +0200)] 
core: name socket unit instances after the socket cookie

On linux sockets have a really good, unique identifier, the SO_COOKIE,
which is used by sockdiag and BPF and elsewhere. Let's expose this more
prominently in the service name of per-connection services invoked via
Accept=yes sockets.

This is really nice, because together with our $SO_COOKIE env var we can
now match up services, process execution contexts, and "ss" outputs, BPF
rules, and more.

5 months agocore: pass the socket cookie to invoked per-connection service instances as $SO_COOKI...
Lennart Poettering [Thu, 15 May 2025 07:15:46 +0000 (09:15 +0200)] 
core: pass the socket cookie to invoked per-connection service instances as $SO_COOKIE env var

The socket cookie is just too useful for identifying connections, let's
emphasize this a bit and pass it as environment variable.

5 months agosocket-util: add trivial socket_get_cookie() helper
Lennart Poettering [Thu, 15 May 2025 07:15:10 +0000 (09:15 +0200)] 
socket-util: add trivial socket_get_cookie() helper

5 months agoman: correct version information when $REMOTE_ADDR/$REMOTE_PORT where added
Lennart Poettering [Thu, 15 May 2025 07:44:02 +0000 (09:44 +0200)] 
man: correct version information when $REMOTE_ADDR/$REMOTE_PORT where added

This was in commit 3b1c524154c876aecebc98787975cc2943100210, i.e. in the
v220 cycle.

5 months agoman: don't claim REMOTE_PORT= was initialized to the protocol for AF_RAW sockets
Lennart Poettering [Thu, 15 May 2025 07:06:52 +0000 (09:06 +0200)] 
man: don't claim REMOTE_PORT= was initialized to the protocol for AF_RAW sockets

This claim has no basis in reality, not even in the original commit
where the sentence was added this was true, see
3b1c524154c876aecebc98787975cc2943100210.

Hence removing.

5 months agobus-polkit: add a generic vtable for methods with no params, but with polkit 37466/head
Lennart Poettering [Thu, 15 May 2025 07:30:37 +0000 (09:30 +0200)] 
bus-polkit: add a generic vtable for methods with no params, but with polkit

5 months agocore: always handle method call params via sd_varlink_dispatch(), even if we accept...
Lennart Poettering [Thu, 15 May 2025 07:30:12 +0000 (09:30 +0200)] 
core: always handle method call params via sd_varlink_dispatch(), even if we accept none

This results in much more precise errors for the clients, and is what we
do everywhere else these days.

5 months agocore: always enable CPU accounting 37448/head
Mike Yuan [Mon, 14 Apr 2025 12:07:59 +0000 (14:07 +0200)] 
core: always enable CPU accounting

Our baseline is v5.4 and cgroup v2 is enforced now,
which means CPU accounting is cheap everywhere without
requiring any controller, hence just remove the directive.

5 months agoman: don't duplicate version in History section
Mike Yuan [Wed, 14 May 2025 18:33:22 +0000 (20:33 +0200)] 
man: don't duplicate version in History section

5 months agoman/systemd-run: --wait shows more than CPU accounting data
Mike Yuan [Wed, 14 May 2025 16:47:16 +0000 (18:47 +0200)] 
man/systemd-run: --wait shows more than CPU accounting data

5 months agosystemctl-show: drop BlockIO* property formatter
Mike Yuan [Wed, 14 May 2025 16:39:50 +0000 (18:39 +0200)] 
systemctl-show: drop BlockIO* property formatter

5 months agocore: drop Manager.blockio_accounting
Mike Yuan [Wed, 14 May 2025 16:36:16 +0000 (18:36 +0200)] 
core: drop Manager.blockio_accounting

Follow-up for 98d64ff5004b497a853e9058217c6eff46065fdb

5 months agocgtop: drop v1 support
Mike Yuan [Mon, 14 Apr 2025 12:07:44 +0000 (14:07 +0200)] 
cgtop: drop v1 support

5 months agomountpoint-util: remove unused TMPFS_LIMITS_SYS_FS_CGROUP
Mike Yuan [Wed, 14 May 2025 19:59:37 +0000 (21:59 +0200)] 
mountpoint-util: remove unused TMPFS_LIMITS_SYS_FS_CGROUP

Follow-up for 6801a9d88afe08648c70e2353b4be8ee04a871e3

5 months agocgroup-util: drop cg_kill() cgroup.threads kludge
Mike Yuan [Wed, 14 May 2025 20:23:09 +0000 (22:23 +0200)] 
cgroup-util: drop cg_kill() cgroup.threads kludge

Our baseline is v5.4 now.

5 months agoresolve: fix typo
Yu Watanabe [Wed, 14 May 2025 22:16:12 +0000 (07:16 +0900)] 
resolve: fix typo

Follow-up for 801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47dd.

5 months agoportable: Clean up includes 37467/head
Daan De Meyer [Wed, 14 May 2025 21:35:14 +0000 (23:35 +0200)] 
portable: Clean up includes

Split out of #37344.

5 months agocoredump: Clean up includes
Daan De Meyer [Wed, 14 May 2025 21:32:00 +0000 (23:32 +0200)] 
coredump: Clean up includes

Split out of #37344.

5 months agohibernate-resume: Clean up includes
Daan De Meyer [Wed, 14 May 2025 21:31:07 +0000 (23:31 +0200)] 
hibernate-resume: Clean up includes

Split out of #37344.

5 months agointegritysetup: Clean up includes
Daan De Meyer [Wed, 14 May 2025 21:28:54 +0000 (23:28 +0200)] 
integritysetup: Clean up includes

Split out of #37344.

5 months agolocale: Clean up includes
Daan De Meyer [Wed, 14 May 2025 21:26:58 +0000 (23:26 +0200)] 
locale: Clean up includes

Split out of #37344.

5 months agonsresourced: Clean up includes
Daan De Meyer [Wed, 14 May 2025 21:26:24 +0000 (23:26 +0200)] 
nsresourced: Clean up includes

Split out of #37344.

5 months agouserns-restrict: Move HAVE_VMLINUX check into functions
Daan De Meyer [Wed, 14 May 2025 21:23:31 +0000 (23:23 +0200)] 
userns-restrict: Move HAVE_VMLINUX check into functions

Let's do these checks like we try to do them elsewhere, in the
function, not outside. This avoids having to declare the function
arguments twice and keeps the logic for each function together
instead of spread out across the file.

5 months agomountfsd: Clean up includes
Daan De Meyer [Wed, 14 May 2025 21:19:02 +0000 (23:19 +0200)] 
mountfsd: Clean up includes

Split out of #37344.

5 months agonss: Clean up includes
Daan De Meyer [Wed, 14 May 2025 21:17:46 +0000 (23:17 +0200)] 
nss: Clean up includes

Split out of #37344.

5 months agoshutdown: Clean up includes
Daan De Meyer [Wed, 14 May 2025 21:15:25 +0000 (23:15 +0200)] 
shutdown: Clean up includes

Split out of #37344.

5 months agohashmap: Split out iterator.h
Daan De Meyer [Wed, 14 May 2025 20:59:06 +0000 (22:59 +0200)] 
hashmap: Split out iterator.h

As preparation for #37344, let's split out iterator.h so we can
avoid including the entirety of hashmap.h where it's not needed.

5 months agobusctl: Clean up includes
Daan De Meyer [Wed, 14 May 2025 21:11:19 +0000 (23:11 +0200)] 
busctl: Clean up includes

Split out of #37344.

5 months agopath: Clean up includes
Daan De Meyer [Wed, 14 May 2025 21:04:52 +0000 (23:04 +0200)] 
path: Clean up includes

5 months agotimedate: Clean up includes
Daan De Meyer [Wed, 14 May 2025 21:03:48 +0000 (23:03 +0200)] 
timedate: Clean up includes

Split out of #37344.

5 months agouserdb: Clean up includes
Daan De Meyer [Wed, 14 May 2025 21:03:23 +0000 (23:03 +0200)] 
userdb: Clean up includes

Split out of #37344.

5 months agouser-record: Make sure UserStorage enum has the same name as its typedef
Daan De Meyer [Wed, 14 May 2025 21:59:25 +0000 (23:59 +0200)] 
user-record: Make sure UserStorage enum has the same name as its typedef

5 months agotree-wide: Clean up includes (#37457)
Daan De Meyer [Wed, 14 May 2025 21:53:49 +0000 (23:53 +0200)] 
tree-wide: Clean up includes (#37457)

5 months agotree-wide: Clean up includes 37457/head
Daan De Meyer [Wed, 14 May 2025 20:22:11 +0000 (22:22 +0200)] 
tree-wide: Clean up includes

This commit cleans up the includes for all the small tools across
the tree.

A few cases of returning EXIT_SUCCESS are replaced with returning
0 to avoid including <stdlib.h>.

Split out of #37344.