]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
11 months agoNEWS: add comment about SysV script deprecation 28179/head
Lennart Poettering [Tue, 27 Jun 2023 21:19:17 +0000 (23:19 +0200)] 
NEWS: add comment about SysV script deprecation

11 months agosysv-generator: make sysv deprecation message a bit "louder"
Lennart Poettering [Tue, 27 Jun 2023 16:46:28 +0000 (18:46 +0200)] 
sysv-generator: make sysv deprecation message a bit "louder"

Let's add a catalog entry, make the log record structured, and most
importantly, let's add warning emojis.

Just to underline that this stuff should really go away.

11 months agojournalctl: read env vars that override compiled catalog database and source files
Lennart Poettering [Tue, 27 Jun 2023 21:15:27 +0000 (23:15 +0200)] 
journalctl: read env vars that override compiled catalog database and source files

This makes it a bit easier to test catalog files without installing
systemd.

11 months agocatalog,po: update Polish translation
Piotr Drąg [Sun, 28 May 2023 11:35:31 +0000 (13:35 +0200)] 
catalog,po: update Polish translation

11 months agotpm2: make PcrIndex an anonymous enum
Lennart Poettering [Tue, 27 Jun 2023 16:46:07 +0000 (18:46 +0200)] 
tpm2: make PcrIndex an anonymous enum

It just gives names for things generally just handled as numeric
indexes, hence drop the type name, and make the enum anonymous. Nothing
is using the type name anyway.

11 months agohwdb: fix volume control keys on Lenovo IdeaPad Flex 5 (14ARE05)
Hoe Hao Cheng [Tue, 27 Jun 2023 13:29:57 +0000 (21:29 +0800)] 
hwdb: fix volume control keys on Lenovo IdeaPad Flex 5 (14ARE05)

11 months agorepart: Fix HAVE_LIBCRYPTSETUP check
Daan De Meyer [Tue, 27 Jun 2023 11:54:22 +0000 (13:54 +0200)] 
repart: Fix HAVE_LIBCRYPTSETUP check

Fixes #28169

11 months agoNEWS: copy deprecation notices for cgroup v1 and unmerged-usr/split-usr
Luca Boccassi [Tue, 27 Jun 2023 11:38:27 +0000 (12:38 +0100)] 
NEWS: copy deprecation notices for cgroup v1 and unmerged-usr/split-usr

11 months agoNEWS: fix typos
Luca Boccassi [Tue, 27 Jun 2023 11:30:57 +0000 (12:30 +0100)] 
NEWS: fix typos

11 months agostart updating NEWS for 254
Lennart Poettering [Tue, 27 Jun 2023 11:13:27 +0000 (13:13 +0200)] 
start updating NEWS for 254

11 months agoreplace basename() with path_extract_filename() in resolved-resolv-conf.c (#28114)
Steven Luo [Tue, 27 Jun 2023 08:11:38 +0000 (04:11 -0400)] 
replace basename() with path_extract_filename() in resolved-resolv-conf.c (#28114)

11 months agoMerge pull request #28064 from bluca/test_oomd_swap
Luca Boccassi [Mon, 26 Jun 2023 18:39:07 +0000 (19:39 +0100)] 
Merge pull request #28064 from bluca/test_oomd_swap

TEST-55-OOMD: use 'stress' to create high pressure, ensure swap is set up correctly on Ubuntu CI

11 months agoMerge pull request #28159 from poettering/bpf-foreign-warnings
Lennart Poettering [Mon, 26 Jun 2023 16:02:47 +0000 (18:02 +0200)] 
Merge pull request #28159 from poettering/bpf-foreign-warnings

bpf-foreign: tweaks

11 months agomount-util: use inode_type_to_string() in mode_to_inaccessible_inode()
Lennart Poettering [Mon, 26 Jun 2023 10:52:22 +0000 (12:52 +0200)] 
mount-util: use inode_type_to_string() in mode_to_inaccessible_inode()

Let's reuse the inode type name table here and shorten/simplify the code
a bit.

11 months agofirstboot: fix typo
Antonio Alvarez Feijoo [Mon, 26 Jun 2023 14:01:13 +0000 (16:01 +0200)] 
firstboot: fix typo

11 months agosleep: refuse hibernation if there's no possible way to resume
Mike Yuan [Fri, 23 Jun 2023 21:49:21 +0000 (05:49 +0800)] 
sleep: refuse hibernation if there's no possible way to resume

Follow-up for 90efe8a6d4c0035c6a01d42805be87d99fb12f9a
Closes #19819

11 months agomkosi: Update to latest
Daan De Meyer [Mon, 26 Jun 2023 12:08:49 +0000 (14:08 +0200)] 
mkosi: Update to latest

mkosi now prebuilds the hwdb during image build which should hopefully
get rid of the CentOS 8 failures we're seeing in CI.

11 months agoman: rework BPFForeign= documentation a bit 28159/head
Lennart Poettering [Mon, 26 Jun 2023 11:16:11 +0000 (13:16 +0200)] 
man: rework BPFForeign= documentation a bit

Various assorted changes, among them make clear that a missing BPF
program is not reason to abort unit activation.

11 months agobpf-foreign: add an explicit, explanatory message when reference BPF program is not...
Lennart Poettering [Mon, 26 Jun 2023 11:05:56 +0000 (13:05 +0200)] 
bpf-foreign: add an explicit, explanatory message when reference BPF program is not loaded yet

11 months agobpf-foreign: if one program fails, still load the next
Lennart Poettering [Mon, 26 Jun 2023 11:04:59 +0000 (13:04 +0200)] 
bpf-foreign: if one program fails, still load the next

Let's make sure that if we load one program we don't prematurely fail,
and continue with the others still.

11 months agobpf-foreign: remove duplicate various occasions of duplicate logging
Lennart Poettering [Mon, 26 Jun 2023 11:03:39 +0000 (13:03 +0200)] 
bpf-foreign: remove duplicate various occasions of duplicate logging

11 months agotest: skip if ldd command not found
Yu Watanabe [Sun, 25 Jun 2023 05:53:02 +0000 (14:53 +0900)] 
test: skip if ldd command not found

Prompted by #28015.

11 months agoMerge pull request #28117 from yuwata/copy-follow-ups
Daan De Meyer [Sun, 25 Jun 2023 11:35:15 +0000 (12:35 +0100)] 
Merge pull request #28117 from yuwata/copy-follow-ups

copy: several follow ups

11 months agoMerge pull request #28149 from mrc0mmand/test-machinectl-bump-container-size
Luca Boccassi [Sun, 25 Jun 2023 11:01:30 +0000 (12:01 +0100)] 
Merge pull request #28149 from mrc0mmand/test-machinectl-bump-container-size

test: bump the test container size to 64 MiB

11 months agopo: Translated using Weblate (Korean)
김인수 [Sun, 25 Jun 2023 07:20:56 +0000 (09:20 +0200)] 
po: Translated using Weblate (Korean)

Currently translated at 100.0% (193 of 193 strings)

Co-authored-by: 김인수 <simmon@nplob.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/ko/
Translation: systemd/main

11 months agoMerge pull request #28147 from mrc0mmand/drop-workarounds
Yu Watanabe [Sun, 25 Jun 2023 05:13:45 +0000 (14:13 +0900)] 
Merge pull request #28147 from mrc0mmand/drop-workarounds

test: drop a couple of workarounds for recently fixed issues

11 months agotest: bump the test container size to 64 MiB 28149/head
Frantisek Sumsal [Sat, 24 Jun 2023 18:25:04 +0000 (20:25 +0200)] 
test: bump the test container size to 64 MiB

As 32 MiB appears to be on the edge of barely enough on C8S:

[  149.974689] testsuite-13.sh[601]: + dd if=/dev/zero of=/tmp/container.raw bs=1M count=32
[  150.388423] testsuite-13.sh[1096]: 32+0 records in
[  150.390721] testsuite-13.sh[1096]: 32+0 records out
[  150.392450] testsuite-13.sh[1096]: 33554432 bytes (34 MB, 32 MiB) copied, 0.354336 s, 94.7 MB/s
[  150.396422] testsuite-13.sh[601]: + mkfs.ext4 /tmp/container.raw
[  150.472209] testsuite-13.sh[1097]: mke2fs 1.45.6 (20-Mar-2020)
[  150.561303] testsuite-13.sh[1097]: Discarding device blocks: done
[  150.565438] testsuite-13.sh[1097]: Creating filesystem with 32768 1k blocks and 8192 inodes
[  150.568301] testsuite-13.sh[1097]: Filesystem UUID: d8e3c43b-0f1f-4e89-8c26-100e4a32b64f
[  150.569777] testsuite-13.sh[1097]: Superblock backups stored on blocks:
[  150.571135] testsuite-13.sh[1097]:   8193, 24577
[  150.572751] testsuite-13.sh[1097]: Allocating group tables: done
[  150.574294] testsuite-13.sh[1097]: Writing inode tables: done
[  150.598696] testsuite-13.sh[1097]: Creating journal (4096 blocks): done
[  150.604285] testsuite-13.sh[1097]: Writing superblocks and filesystem accounting information: done
[  150.612309] testsuite-13.sh[601]: + mount -o loop /tmp/container.raw /tmp/mnt
[  150.879736] testsuite-13.sh[601]: + cp -r /var/lib/machines/container1/bin ... /tmp/mnt
[  152.347545] testsuite-13.sh[1104]: cp: cannot create directory '/tmp/mnt/var/log': No space left on device
[  152.351739] testsuite-13.sh[1104]: cp: cannot create directory '/tmp/mnt/var/tmp': No space left on device

11 months agotest: show the subtest name together with the failing code
Frantisek Sumsal [Sat, 24 Jun 2023 18:43:26 +0000 (20:43 +0200)] 
test: show the subtest name together with the failing code

To make debugging slightly easier.

11 months agotest: don't assume yum is a script
François Rigault [Sat, 24 Jun 2023 08:44:54 +0000 (10:44 +0200)] 
test: don't assume yum is a script

on Rawhide at the moment yum is a symlink to dnf5 which is a binary.

11 months agoTEST-55-OOMD: use swap file instead of partition 28064/head
Luca Boccassi [Fri, 23 Jun 2023 22:19:31 +0000 (23:19 +0100)] 
TEST-55-OOMD: use swap file instead of partition

The partition seems not to work on Ubuntu for some reason, use a
swap file instead

11 months agoTEST-55-OOMD: use 'stress' to create high pressure
Luca Boccassi [Fri, 16 Jun 2023 23:07:32 +0000 (00:07 +0100)] 
TEST-55-OOMD: use 'stress' to create high pressure

The test fails on my machine, running Debian stable, because
testsuite-55-testbloat.service just swaps and never goes over the
limit, so it's not killed. Use 'stress' instead which seems to be
able to overwhelm the swap too.

11 months agotest: drop timeout when running portablectl 28147/head
Frantisek Sumsal [Sat, 24 Jun 2023 08:35:12 +0000 (10:35 +0200)] 
test: drop timeout when running portablectl

The deadlock should be resolved by #28123, so let's check if it's indeed
the case.

11 months agotest: test the /boot endpoint under nspawn as well
Frantisek Sumsal [Sat, 24 Jun 2023 08:33:14 +0000 (10:33 +0200)] 
test: test the /boot endpoint under nspawn as well

Since #28144 should be now resolved by fb0e106.

11 months agoMerge pull request #27330 from YHNdnzj/hibernate-resume-auto
Lennart Poettering [Fri, 23 Jun 2023 21:03:32 +0000 (23:03 +0200)] 
Merge pull request #27330 from YHNdnzj/hibernate-resume-auto

sleep/hibernate-resume: pass hibernate location through efivar for resume without kernel cmdline

11 months agoMerge pull request #27843 from yuwata/usleep_safe
Lennart Poettering [Fri, 23 Jun 2023 21:03:15 +0000 (23:03 +0200)] 
Merge pull request #27843 from yuwata/usleep_safe

time-util: introduce usleep_safe()

11 months agoMerge pull request #28144 from poettering/procfs-submounts-move
Lennart Poettering [Fri, 23 Jun 2023 20:53:25 +0000 (22:53 +0200)] 
Merge pull request #28144 from poettering/procfs-submounts-move

pid1: when setting up a new procfs instance for a service, mount submounts from host into it

11 months agoexecute: don't honour PrivateNetwork() if we lack CAP_NET_ADMIN
Lennart Poettering [Fri, 23 Jun 2023 14:06:29 +0000 (16:06 +0200)] 
execute: don't honour PrivateNetwork() if we lack CAP_NET_ADMIN

Somehow the Linux kernel allows us to allocate a network namespace if we
possess CAP_SYS_ADMIN but doesn't allow us to configure it, unless we
also have CAP_NET_ADMIN.

Taking that into consideration let's avoid allocating a network
namespace we cannot even configure "lo" in.

This is common case if nspawn is invoked without userns and without
netns, because in that case it will have CAP_SYS_ADMIN but no
CAP_NET_ADMIN.

This also takes down a notch the messages about the automatic
downgrading. These have been LOG_WARNING so far, and I downgraded them
to LOG_NOTICE, since in an environment where CAP_NET_ADMIN is not
available this is really not something to be concerned about, but still
noticable. With that it's still more priorized than regular LOG_INFO.

Fixes: #27292
11 months agoMerge pull request #28140 from mrc0mmand/more-coverage
Luca Boccassi [Fri, 23 Jun 2023 18:56:28 +0000 (19:56 +0100)] 
Merge pull request #28140 from mrc0mmand/more-coverage

test: test transactions with cycles

11 months agotest: ensure ProtectProc=invisible retains host submounts 28144/head
Lennart Poettering [Fri, 23 Jun 2023 16:27:45 +0000 (18:27 +0200)] 
test: ensure ProtectProc=invisible retains host submounts

11 months agonamespace: when mounting new proc instance, bind mount submounts of source over
Lennart Poettering [Fri, 23 Jun 2023 15:50:39 +0000 (17:50 +0200)] 
namespace: when mounting new proc instance, bind mount submounts of source over

Fixes: #28059
11 months agomount-util: add helper that can bind mount submounts of one dir to another
Lennart Poettering [Fri, 23 Jun 2023 15:50:17 +0000 (17:50 +0200)] 
mount-util: add helper that can bind mount submounts of one dir to another

11 months agomount-util: don't claim maybe-uninitialized was false that is valid
Lennart Poettering [Fri, 23 Jun 2023 15:52:31 +0000 (17:52 +0200)] 
mount-util: don't claim maybe-uninitialized was false that is valid

11 months agotmpfile-util: drop spurious double newline
Lennart Poettering [Fri, 23 Jun 2023 15:49:36 +0000 (17:49 +0200)] 
tmpfile-util: drop spurious double newline

11 months agohibernate-resume: support resuming through efivar HibernateLocation 27330/head
Mike Yuan [Mon, 24 Apr 2023 16:34:19 +0000 (00:34 +0800)] 
hibernate-resume: support resuming through efivar HibernateLocation

11 months agosleep: write hibernate location to efivar HibernateLocation
Mike Yuan [Mon, 24 Apr 2023 16:32:03 +0000 (00:32 +0800)] 
sleep: write hibernate location to efivar HibernateLocation

11 months agohibernate-resume: rework to follow the logic of sleep.c and use
Mike Yuan [Tue, 18 Apr 2023 17:21:55 +0000 (01:21 +0800)] 
hibernate-resume: rework to follow the logic of sleep.c and use
main-func.h

Preparation for #27247

11 months agobootctl: log correct error about device_path_make_canonical()
Mike Yuan [Fri, 23 Jun 2023 14:52:17 +0000 (22:52 +0800)] 
bootctl: log correct error about device_path_make_canonical()

11 months agosleep: always write resume_offset if possible
Mike Yuan [Tue, 18 Apr 2023 16:09:08 +0000 (00:09 +0800)] 
sleep: always write resume_offset if possible

There's no need to conditionalize this.
Setting resume_offset=0 doesn't harm, and can even help
by overriding potentially existing half-written settings.

11 months agoman: fix references to gethostname/sethostname
Antonio Alvarez Feijoo [Fri, 23 Jun 2023 14:34:55 +0000 (16:34 +0200)] 
man: fix references to gethostname/sethostname

11 months agoupdate TODO
Lennart Poettering [Fri, 23 Jun 2023 13:23:09 +0000 (15:23 +0200)] 
update TODO

11 months agotree-wide: use https for the 0pointer.de doc links
Frantisek Sumsal [Fri, 23 Jun 2023 11:08:57 +0000 (13:08 +0200)] 
tree-wide: use https for the 0pointer.de doc links

11 months agoresolved: if ipv6 is off patch hostname→address query with unspec family to ipv4
Lennart Poettering [Thu, 22 Jun 2023 20:26:23 +0000 (22:26 +0200)] 
resolved: if ipv6 is off patch hostname→address query with unspec family to ipv4

If the client never specified the address family, and IPv6 is off in the
kernel, then look only for A, never for AAAA RRs.

Fixes: #23951
11 months agotest: test transactions with cycles 28140/head
Frantisek Sumsal [Fri, 23 Jun 2023 12:06:42 +0000 (14:06 +0200)] 
test: test transactions with cycles

Provides coverage for systemd/systemd#26872.

With systemd/systemd#26875 reverted:

[16444.287652] testsuite-03.sh[71]: + for i in {0..19}
[16444.287652] testsuite-03.sh[71]: + systemctl start transaction-cycle0.service
[16444.359503] systemd[1]: =================================================================
[16444.360321] systemd[1]: ==1==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6180002e578e at pc 0x7f73b25ec7a6 bp 0x7ffc5531c6f0 sp 0x7ffc5531be68
[16444.360798] systemd[1]:
[16444.361044] systemd[1]: READ of size 783 at 0x6180002e578e thread T0 (systemd)
[16444.391684] systemd[1]:     #0 0x7f73b25ec7a5  (/lib64/libasan.so.5+0x557a5)
[16444.392167] systemd[1]:     #1 0x7f73b260a1d5 in __interceptor_vasprintf (/lib64/libasan.so.5+0x731d5)
[16444.392442] systemd[1]:     #2 0x7f73afa1d1e1 in log_format_iovec ../src/basic/log.c:996
[16444.392750] systemd[1]:     #3 0x7f73afa1e7b6 in log_struct_internal ../src/basic/log.c:1058
[16444.393101] systemd[1]:     #4 0x7f73b1979136 in transaction_verify_order_one ../src/core/transaction.c:392
[16444.393540] systemd[1]:     #5 0x7f73b197ac82 in transaction_verify_order_one ../src/core/transaction.c:463
[16444.393946] systemd[1]:     #6 0x7f73b197ac82 in transaction_verify_order_one ../src/core/transaction.c:463
[16444.394262] systemd[1]:     #7 0x7f73b197ac82 in transaction_verify_order_one ../src/core/transaction.c:463
[16444.394532] systemd[1]:     #8 0x7f73b197ac82 in transaction_verify_order_one ../src/core/transaction.c:463
[16444.394812] systemd[1]:     #9 0x7f73b197ac82 in transaction_verify_order_one ../src/core/transaction.c:463
...

11 months agotest: make sure we get PID1's stack trace on ASan/UBSan errors
Frantisek Sumsal [Fri, 23 Jun 2023 12:28:30 +0000 (14:28 +0200)] 
test: make sure we get PID1's stack trace on ASan/UBSan errors

As hitting an ASan/UBSan error in PID1 results in a crash (and a kernel
panic when running under qemu), we usually lose the stack trace which
makes debugging quite painful. Let's mitigate this by forwarding the
stack trace to multiple places - namely to a file and the syslog.

11 months agoMerge pull request #28123 from poettering/threads-no-more
Luca Boccassi [Fri, 23 Jun 2023 12:24:41 +0000 (13:24 +0100)] 
Merge pull request #28123 from poettering/threads-no-more

get rid of any threads in PID 1

11 months agoelf-util: check for overflow when computing end of core's PT_LOAD segments
Romain Geissler [Thu, 22 Jun 2023 16:05:18 +0000 (16:05 +0000)] 
elf-util: check for overflow when computing end of core's PT_LOAD segments

11 months agoMerge pull request #28127 from poettering/coredump-loop-read
Luca Boccassi [Fri, 23 Jun 2023 11:28:40 +0000 (12:28 +0100)] 
Merge pull request #28127 from poettering/coredump-loop-read

coredump: fixes with overly large coredumps

11 months agobasic: drop unused include 28123/head
Lennart Poettering [Thu, 22 Jun 2023 20:24:30 +0000 (22:24 +0200)] 
basic: drop unused include

11 months agoprocess-util: add simple wrapper around PR_SET_CHILD_SUBREAPER
Lennart Poettering [Thu, 22 Jun 2023 20:24:04 +0000 (22:24 +0200)] 
process-util: add simple wrapper around PR_SET_CHILD_SUBREAPER

Let's a simple helper that knows how to deal with PID == 1.

11 months agodocs: document threading situation in coding style
Lennart Poettering [Thu, 22 Jun 2023 09:53:16 +0000 (11:53 +0200)] 
docs: document threading situation in coding style

11 months agoasync: use FORK_DETACH for asynchronous syncs
Lennart Poettering [Thu, 22 Jun 2023 13:11:52 +0000 (15:11 +0200)] 
async: use FORK_DETACH for asynchronous syncs

To get proper "fire-and-forget" feeling we really want to make sure
noone has to reap the forked off process.

11 months agoasync: add explanatory comment
Lennart Poettering [Thu, 22 Jun 2023 13:09:50 +0000 (15:09 +0200)] 
async: add explanatory comment

11 months agoasync: drop the now unused asynchronous_job()
Lennart Poettering [Thu, 22 Jun 2023 10:04:46 +0000 (12:04 +0200)] 
async: drop the now unused asynchronous_job()

11 months agoasync: add generic implementation of asynchronous_rm_rf()
Lennart Poettering [Thu, 22 Jun 2023 09:55:59 +0000 (11:55 +0200)] 
async: add generic implementation of asynchronous_rm_rf()

This one doesn't use threads anymore. This is the last use of threads in
PID 1. Yay!

Fixes: #27287
11 months agoshared: move async.[ch] from src/basic/ → src/shared/
Lennart Poettering [Thu, 22 Jun 2023 09:54:51 +0000 (11:54 +0200)] 
shared: move async.[ch] from src/basic/ → src/shared/

That way we can later add an async wrapper for rm_rf() which is in
src/shared/, too.

11 months agoprocess-util: add FORK_DETACH flag for forking of detached child
Lennart Poettering [Thu, 22 Jun 2023 09:51:25 +0000 (11:51 +0200)] 
process-util: add FORK_DETACH flag for forking of detached child

A test for this is later added indirectly, via aynchronous_rm_rf() that
uses this and comes with a suitable test.

11 months agoautomont: rework expiry to use subprocess rather than thread
Lennart Poettering [Thu, 22 Jun 2023 08:57:31 +0000 (10:57 +0200)] 
automont: rework expiry to use subprocess rather than thread

One more step towards a thread-free PID1: let's do automount expiry in a
subprocess rather than a thread.

11 months agobasic: add comments about raw_clone() calls not supporting threads/malloc in child
Lennart Poettering [Thu, 22 Jun 2023 08:21:32 +0000 (10:21 +0200)] 
basic: add comments about raw_clone() calls not supporting threads/malloc in child

11 months agoasync: stop using threads for asynchronous_close()
Lennart Poettering [Thu, 22 Jun 2023 08:28:13 +0000 (10:28 +0200)] 
async: stop using threads for asynchronous_close()

Let's work towards PID1 being purely single threaded again. Let's rework
asynchronous_close() on top of clone() with CLONE_FILES (so that we
can manipulate PID1's fd table correctly).

One less use of pthread_create() in PID 1.

11 months agoprocess-util: add clone_with_nested_stack() helper
Lennart Poettering [Thu, 22 Jun 2023 08:27:17 +0000 (10:27 +0200)] 
process-util: add clone_with_nested_stack() helper

This wraps glibc's clone() but deals with the 'stack' parameter in a
sensible way. Only supports invocations without CLONE_VM, i.e. when
child is a CoW copy of parent.

11 months agoprocess-util: add helper that detects if we are a reaper process
Lennart Poettering [Thu, 22 Jun 2023 09:52:06 +0000 (11:52 +0200)] 
process-util: add helper that detects if we are a reaper process

11 months agoMerge pull request #28129 from poettering/userdb-ratelimit
Lennart Poettering [Fri, 23 Jun 2023 07:53:21 +0000 (09:53 +0200)] 
Merge pull request #28129 from poettering/userdb-ratelimit

userdbd: make sure we don't exit under pressure

11 months agoman: correct and extend JournalSizeMax= 28127/head
Lennart Poettering [Thu, 22 Jun 2023 15:10:14 +0000 (17:10 +0200)] 
man: correct and extend JournalSizeMax=

The man page claimed the default was 10M, but that's not true, it's
767M.

Also mention there's no point in increasing it further.

See: #26748

11 months agocoredump: clamp JournalSizeMax= to maximum journald would accept
Lennart Poettering [Thu, 22 Jun 2023 15:11:00 +0000 (17:11 +0200)] 
coredump: clamp JournalSizeMax= to maximum journald would accept

See: #26748

11 months agocoredump: use loop_read() for reading coredump into memory
Lennart Poettering [Thu, 22 Jun 2023 14:48:48 +0000 (16:48 +0200)] 
coredump: use loop_read() for reading coredump into memory

Fixes: #26748
11 months agotpm2-util: look for tpm2-pcr-signature.json directly in /.extra/
Lennart Poettering [Thu, 22 Jun 2023 14:26:15 +0000 (16:26 +0200)] 
tpm2-util: look for tpm2-pcr-signature.json directly in /.extra/

So far we relied on tmpfiles.d to copy tpm2-pcr-signature.json from
/.extra/ into /run/systemd/. This is racy however if cryptsetup runs too
early, and we cannot unconditionally run it after tmpfiles completed.

hence, let's teach cryptsetup to directly look for the file in /.extra/,
in order to simplify this, and remove the race. But do so only in the
initrd (as only there /.extra/ is a concept).

We generally prefer looking in /run/systemd/, since things are under
user control then. In the regular system we exclusively want that
userspace looks there.

Fixes: #26490
11 months agocopy: propagate error in fd_copy_directory() 28117/head
Yu Watanabe [Thu, 22 Jun 2023 07:13:29 +0000 (16:13 +0900)] 
copy: propagate error in fd_copy_directory()

Follow-up for 01428141ba42a06d22f2c0e0df26049e700f4098.

Fixes CID#1513190.

11 months agocopy: fix fd leak
Yu Watanabe [Fri, 23 Jun 2023 01:10:58 +0000 (10:10 +0900)] 
copy: fix fd leak

Follow-up for 01428141ba42a06d22f2c0e0df26049e700f4098.

11 months agocopy: add one more assertions about copy_flags
Yu Watanabe [Thu, 22 Jun 2023 07:12:24 +0000 (16:12 +0900)] 
copy: add one more assertions about copy_flags

Follow-up for 01428141ba42a06d22f2c0e0df26049e700f4098.

11 months agotree-wide: getpid() → getpid_cached()
Lennart Poettering [Mon, 10 Aug 2020 14:33:02 +0000 (16:33 +0200)] 
tree-wide: getpid() → getpid_cached()

This doesn't really matter, but let's be systematic and prefer
getpid_cached() in our codebase.

11 months agouserdbd: when we hit a flood of requests to start more workers, don't exit 28129/head
Lennart Poettering [Thu, 22 Jun 2023 16:51:34 +0000 (18:51 +0200)] 
userdbd: when we hit a flood of requests to start more workers, don't exit

Let's tweak what we do if we detect a flood of requests to start more
workers: if none of the workers ever sticks (i.e. the worker count is
zero) then let's just give up, as before.

Otherwise, let's just not start more workers for a while, and do so
again after a while. Thus spawning ofr workers will "cool off" for a
while.

Fixes: #27028
11 months agouserdbd: prefix parameters with their names more
Lennart Poettering [Thu, 22 Jun 2023 16:50:43 +0000 (18:50 +0200)] 
userdbd: prefix parameters with their names more

11 months agouserdbd: drastically raise ratelimit we apply on requests for more worker processes
Lennart Poettering [Thu, 22 Jun 2023 16:48:41 +0000 (18:48 +0200)] 
userdbd: drastically raise ratelimit we apply on requests for more worker processes

These requests might come in during lookup floods very quickly, since
multiple worker processes might detect that things should be scaled up
at the same time. Hence, let's substantially raise the limit so that it
doesn't get hit in real-life scenarios and acts more like a safety net.

11 months agomeson: merge two similar loops for unit files
Yu Watanabe [Fri, 16 Jun 2023 01:38:25 +0000 (10:38 +0900)] 
meson: merge two similar loops for unit files

This also merges two arrays units and in_units, and uses dictionary
for declaring units.

This also fixes the condition handling, that previously only two
conditions were handled and rests were ignored.

11 months agodocs: describe $TESTFUNCS briefly
Lennart Poettering [Thu, 22 Jun 2023 14:10:06 +0000 (16:10 +0200)] 
docs: describe $TESTFUNCS briefly

Follow-up for f1a83e41ae985bd17056b3a9fe285cc196358183

11 months agotests: teach tests boilerplate to run selected tests only
Lennart Poettering [Wed, 21 Jun 2023 13:02:59 +0000 (15:02 +0200)] 
tests: teach tests boilerplate to run selected tests only

sometimes its useful to only run a specific test (or multiple) instead
of all implemented in a test. Allow the test name(s) to be specified on the
in a $TESTFUNCS env var, separated by colons.

11 months agoMerge pull request #28104 from DaanDeMeyer/emergency-kexec-halt
Lennart Poettering [Thu, 22 Jun 2023 14:07:35 +0000 (16:07 +0200)] 
Merge pull request #28104 from DaanDeMeyer/emergency-kexec-halt

core: Add halt and kexec emergency actions

11 months agohwdb: Don't generate hwdb if no hwdb files are found
Daan De Meyer [Wed, 21 Jun 2023 11:17:01 +0000 (13:17 +0200)] 
hwdb: Don't generate hwdb if no hwdb files are found

11 months agocore: restrict ImportCredential= globbing
Lennart Poettering [Wed, 21 Jun 2023 08:53:24 +0000 (10:53 +0200)] 
core: restrict ImportCredential= globbing

Let's restrict how we apply credential globbing in ImportCredential=, so
that we have some flexibility in automatically extending the glob
expression with per-instance data eventually without getting into
conflict with the globbing parts.

In our current uses we only allow globbing at the end of the expression,
and this is a new, unreleased feature hence let's be restrictive on this
initially. We can still relax this later if we feel the need to after
all.

Fixes: #28022
11 months agopid1: use FORK_DEATHSIG where appropriate
Lennart Poettering [Thu, 22 Jun 2023 10:38:57 +0000 (12:38 +0200)] 
pid1: use FORK_DEATHSIG where appropriate

11 months agoman: correct reference to sd_id128_get_boot_app_specific
Jan Luebbe [Thu, 22 Jun 2023 10:59:33 +0000 (12:59 +0200)] 
man: correct reference to sd_id128_get_boot_app_specific

The function sd_id128_get_boot_app_specific is the app specific variant of
sd_id128_get_boot.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
11 months agoMerge pull request #28115 from yuwata/meson-tiny-fixes
Daan De Meyer [Thu, 22 Jun 2023 09:49:36 +0000 (11:49 +0200)] 
Merge pull request #28115 from yuwata/meson-tiny-fixes

meson: several tiny fixes

11 months agounits: Use built-in halt and kexec features instead of systemctl 28104/head
Daan De Meyer [Thu, 22 Jun 2023 09:33:18 +0000 (10:33 +0100)] 
units: Use built-in halt and kexec features instead of systemctl

11 months agocore: Add halt and kexec emergency actions
Daan De Meyer [Wed, 21 Jun 2023 09:59:27 +0000 (11:59 +0200)] 
core: Add halt and kexec emergency actions

Let's complete the picture by adding the missing halt and kexec
emergency actions.

11 months agosleep-util: mention that offset is in memory pages
Lennart Poettering [Thu, 22 Jun 2023 08:29:50 +0000 (10:29 +0200)] 
sleep-util: mention that offset is in memory pages

11 months agorpm: fix lua trigger priority for sysusers
Franck Bui [Wed, 21 Jun 2023 08:32:57 +0000 (10:32 +0200)] 
rpm: fix lua trigger priority for sysusers

Commit cd621954ed643c6ee0d869132293e26056a48826 probably forgot to fix the lua
implementation.

11 months agotime-util: introduce usleep_safe() 27843/head
Yu Watanabe [Wed, 31 May 2023 23:31:25 +0000 (08:31 +0900)] 
time-util: introduce usleep_safe()

We use usec_t for storing time value, which is 64bit.
However, usleep() takes useconds_t that is (typically?) 32bit.
Also, usleep() may only support the range [0, 1000000].

This introduce usleep_safe() which takes usec_t.

11 months agotest: check size detections by meson
Yu Watanabe [Wed, 31 May 2023 23:20:04 +0000 (08:20 +0900)] 
test: check size detections by meson

11 months agomeson: sort types
Yu Watanabe [Wed, 31 May 2023 23:18:15 +0000 (08:18 +0900)] 
meson: sort types

11 months agomeson: fix test dependency 28115/head
Yu Watanabe [Mon, 19 Jun 2023 23:20:12 +0000 (08:20 +0900)] 
meson: fix test dependency

Follow-up for daf4e78e4841a527ba62da48fd00e2e6b8805193.