]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
19 months agomkosi: Introduce packaging sources as submodules 31673/head
Daan De Meyer [Fri, 8 Mar 2024 10:33:25 +0000 (11:33 +0100)] 
mkosi: Introduce packaging sources as submodules

By always cloning the latest branch commit, we can't bisect properly
using mkosi as when bisecting wildly different packaging sources will
be used compared to when the commit was merged. By using submodules, we
track individual commits which means when bisecting the same packaging
sources will be used.

We use git submodules as dependabot has support for automatically making
PRs to update git submodules. This commit also includes the necessary
dependabot configuration to enable this.

We make ubuntu/debian use the same submodule instead of adding the debian
packaging sources twice by introducing a new $PKG_SUBDIR environment variable
and using it instead of $DISTRIBUTION.

19 months agomkosi: Remove some leftover shell debugging
Daan De Meyer [Sat, 9 Mar 2024 13:38:00 +0000 (14:38 +0100)] 
mkosi: Remove some leftover shell debugging

19 months agomkosi: Use same pkg/ subdirectory for debian and ubuntu
Daan De Meyer [Fri, 8 Mar 2024 11:57:31 +0000 (12:57 +0100)] 
mkosi: Use same pkg/ subdirectory for debian and ubuntu

Instead of cloning the same repository twice, let's make sure we
use the same directory for both debian/ubuntu.

19 months agoupdate TODO
Lennart Poettering [Wed, 13 Mar 2024 10:21:25 +0000 (11:21 +0100)] 
update TODO

19 months agoupdate TODO
Lennart Poettering [Wed, 13 Mar 2024 10:17:02 +0000 (11:17 +0100)] 
update TODO

19 months agoMerge pull request #31731 from poettering/stat-is-set
Lennart Poettering [Wed, 13 Mar 2024 09:37:15 +0000 (10:37 +0100)] 
Merge pull request #31731 from poettering/stat-is-set

stat-util: add explicit helpers for checking if stat/statx is initialized

19 months agolocal-addresses: call 'assert_not_reached' where appropriate (#31728)
SidhuRupinder [Wed, 13 Mar 2024 05:16:46 +0000 (10:46 +0530)] 
local-addresses: call 'assert_not_reached' where appropriate (#31728)

Added code for calling the 'assert_not_reached' function as the value of the 'family' parameter must be either 'AF_INET' or 'AF_INET6'.

19 months agoMerge pull request #31727 from YHNdnzj/homed-followup
Mike Yuan [Wed, 13 Mar 2024 05:10:34 +0000 (13:10 +0800)] 
Merge pull request #31727 from YHNdnzj/homed-followup

data-fd-util: some cleanups

19 months agoMerge pull request #31735 from mrc0mmand/test-runner
Luca Boccassi [Wed, 13 Mar 2024 00:45:03 +0000 (00:45 +0000)] 
Merge pull request #31735 from mrc0mmand/test-runner

test: split logs from each test into separate files if requested

19 months agofs-utils: new wrapper fd_reopen_propagate_append_and_position()
Lars Ellenberg [Wed, 7 Feb 2024 12:12:50 +0000 (13:12 +0100)] 
fs-utils: new wrapper fd_reopen_propagate_append_and_position()

We may want to propagate O_APPEND, or (try to) keep the current file position,
even if we use fd_reopen() to re-initialize (and "unshare") other file
description status.

For now, used only with --pty to keep/propagate O_APPEND (and/or) position
if set on stdin/stdout.

If we re-open stdout and "drop" the O_APPEND,
we get rather "unexpected" behavior,
for example with repeated "systemd-run --pty >> some-log".

If someone carefully pre-positioned the passed in original file descriptors,
we avoid surprises if we do not reset file postition to zero.

fcntl F_GETFL first, and propagate O_APPEND if present in the existing flags.

Then use lseek to propagate the file position.

19 months agotest: split logs from each test into separate files if requested 31735/head
Frantisek Sumsal [Tue, 12 Mar 2024 12:11:16 +0000 (13:11 +0100)] 
test: split logs from each test into separate files if requested

If both $ARTIFACT_DIRECTORY and $SPLIT_TEST_LOGS are set, split the
output from each test into a separate log file, so we don't have to load
one ginormous log file when checking the results.

19 months agotest: clean up the integration test runner a bit
Frantisek Sumsal [Tue, 12 Mar 2024 11:52:45 +0000 (12:52 +0100)] 
test: clean up the integration test runner a bit

19 months agohomed: fix typo
Antonio Alvarez Feijoo [Tue, 12 Mar 2024 14:22:43 +0000 (15:22 +0100)] 
homed: fix typo

19 months agoci: reduce ASLR entropy
Frantisek Sumsal [Tue, 12 Mar 2024 13:49:55 +0000 (14:49 +0100)] 
ci: reduce ASLR entropy

The latest GH Action runners started using 32-bit entropy for ASLR,
which makes it incompatible with llvm-14. This was fixed in later llvm
releases, but these aren't available on Ubuntu Jammy (22.04). Let's
reduce the ASLR entropy to 28-bit, which should make llvm happy again,
until the issue is resolved.

See: https://github.com/actions/runner-images/issues/9491

19 months agoupdate TODO
Lennart Poettering [Tue, 12 Mar 2024 13:03:29 +0000 (14:03 +0100)] 
update TODO

19 months agocatalog: update Polish translation
Piotr Drąg [Sun, 3 Mar 2024 14:52:08 +0000 (15:52 +0100)] 
catalog: update Polish translation

19 months agoukify: really add default .sbat for UKIs
Luca Boccassi [Wed, 6 Mar 2024 01:12:19 +0000 (01:12 +0000)] 
ukify: really add default .sbat for UKIs

This was lost on refactor, and only addons had a default uki
line in the .sbat. Add it back, and differentiate between the
default for UKIs vs the default for addons, so that they can
be revoked separately. These are only defaults and users are
encouraged to provide their own.

Follow-up for a8b645dec8e6abf4c9ba0c93a6a0088953a2155e

19 months agoMerge pull request #31716 from evverx/fuzz-lease-save-load
Yu Watanabe [Tue, 12 Mar 2024 10:05:17 +0000 (19:05 +0900)] 
Merge pull request #31716 from evverx/fuzz-lease-save-load

fuzz: save/load DHCP client leases

19 months agostat-util: make sure inode_type_to_string() handles anonymous inodes in a reasonable way 31731/head
Lennart Poettering [Tue, 12 Mar 2024 09:45:24 +0000 (10:45 +0100)] 
stat-util: make sure inode_type_to_string() handles anonymous inodes in a reasonable way

19 months agostat-util: add explicit helpers for checking if stat/statx is initialized
Lennart Poettering [Tue, 12 Mar 2024 09:23:34 +0000 (10:23 +0100)] 
stat-util: add explicit helpers for checking if stat/statx is initialized

This is a follow-up for 945a8210c770801c8492eda03b6e9af3ec5d03a3 and
makes the st_dev check generic, so that we can reuse it some other
places. It also incorporates the non-NULL check now, to be a
comprehensive one-stop solution.

The helper is static inline so that compilers can optimize the redundant
checks away in case it is combined with other checks.

19 months agohomework-cifs: log correct errno 31727/head
Mike Yuan [Tue, 12 Mar 2024 07:49:27 +0000 (15:49 +0800)] 
homework-cifs: log correct errno

Follow-up for 606a1f203c8871871bc8c5833d66ccbef870b010

19 months agodata-fd-util: accept size == SIZE_MAX and translate that to strlen
Mike Yuan [Tue, 12 Mar 2024 07:42:23 +0000 (15:42 +0800)] 
data-fd-util: accept size == SIZE_MAX and translate that to strlen

Like what we already do at other places

19 months agodata-fd-util: some modernization
Mike Yuan [Tue, 12 Mar 2024 07:10:03 +0000 (15:10 +0800)] 
data-fd-util: some modernization

19 months agofileio,data-fd-util: use U64_* more
Mike Yuan [Tue, 12 Mar 2024 07:09:05 +0000 (15:09 +0800)] 
fileio,data-fd-util: use U64_* more

19 months agoenv-util: remove unneeded DISABLE_WARNING_FORMAT_NONLITERAL
Mike Yuan [Tue, 12 Mar 2024 06:23:36 +0000 (14:23 +0800)] 
env-util: remove unneeded DISABLE_WARNING_FORMAT_NONLITERAL

_printf_ is used, so this shouldn't emit a warning
in the first place.

19 months agoMerge pull request #31671 from AdrianVovk/homework-cifs-credentials
Mike Yuan [Tue, 12 Mar 2024 07:40:43 +0000 (15:40 +0800)] 
Merge pull request #31671 from AdrianVovk/homework-cifs-credentials

homework-cifs: Pass password via fd

19 months agoMerge pull request #31713 from YHNdnzj/pidref-equal
Mike Yuan [Tue, 12 Mar 2024 06:15:36 +0000 (14:15 +0800)] 
Merge pull request #31713 from YHNdnzj/pidref-equal

pidref: use fd_inode_same to compare pidfds

19 months agoMerge pull request #30021 from yuwata/dhcp-client-id-cleanups
Yu Watanabe [Tue, 12 Mar 2024 04:40:09 +0000 (13:40 +0900)] 
Merge pull request #30021 from yuwata/dhcp-client-id-cleanups

dhcp-server: save bound leases to persistent storage, and load it on start

19 months agotests/run-unit-tests: add option to skip tests
Ross Burton [Mon, 11 Mar 2024 16:41:02 +0000 (16:41 +0000)] 
tests/run-unit-tests: add option to skip tests

In automated QA environments there may be tests that are known to fail,
and being able to skip them is useful to remove known failures from the
test log.

Signed-off-by: Ross Burton <ross.burton@arm.com>
19 months agoMerge pull request #31721 from aafeijoo-suse/service-util-help-fix
Luca Boccassi [Mon, 11 Mar 2024 18:13:57 +0000 (18:13 +0000)] 
Merge pull request #31721 from aafeijoo-suse/service-util-help-fix

shared/service-util: actually use the `bus_introspect` argument in `help()`

19 months agotest/run-unit-tests: sort the test cases we're executing
Ross Burton [Mon, 11 Mar 2024 13:59:55 +0000 (13:59 +0000)] 
test/run-unit-tests: sort the test cases we're executing

When reading test logs manually it is a lot easier when the tests are
sorted by name rather than by disk order.

Signed-off-by: Ross Burton <ross.burton@arm.com>
19 months agohomework-cifs: Pass password via fd 31671/head
Adrian Vovk [Thu, 7 Mar 2024 18:38:26 +0000 (13:38 -0500)] 
homework-cifs: Pass password via fd

Pass the password into mount.cifs via a file descriptor, rather
than putting it into a plain-text file in /tmp. This uses the $PASSWD_FD
environment variable, which is undocumented but has existed since
forever (initial commit from 2010 [1] has it already)

[1]:
https://git.samba.org/?p=cifs-utils.git;a=blob;f=mount.cifs.c;hb=ce0b1609a9eedce6c5eb20eab287ea44217c0a6a#l1477

19 months agotest-network: add test case for DHCP server lease file 30021/head
Yu Watanabe [Mon, 26 Feb 2024 06:22:11 +0000 (15:22 +0900)] 
test-network: add test case for DHCP server lease file

19 months agonetwork/dhcp-server: save leases in state directory
Yu Watanabe [Fri, 1 Mar 2024 03:10:49 +0000 (12:10 +0900)] 
network/dhcp-server: save leases in state directory

Then, we can read the lease file on restart, and the DHCP server will be
able to manage previously assigned addresses.

To save leases in the state directory /var/lib/systemd/network/, this
adds systemd-networkd-dhcp-server.service, and by default
systemd-networkd does not start the DHCP server without the heler
service started.

Closes #29991.

19 months agofuzz-dhcp-server: also test saving and loading lease file
Yu Watanabe [Sun, 10 Mar 2024 05:59:53 +0000 (14:59 +0900)] 
fuzz-dhcp-server: also test saving and loading lease file

19 months agosd-dhcp-server: introduce sd_dhcp_server_set_lease_file() and dhcp_server_{save,load...
Yu Watanabe [Tue, 2 Jan 2024 21:07:17 +0000 (06:07 +0900)] 
sd-dhcp-server: introduce sd_dhcp_server_set_lease_file() and dhcp_server_{save,load}_leases().

The functionality is not used networkd yet in this commit, but will be
used in later commits.

19 months agosd-dhcp-server: also expose lease expiration timestamp in realtime
Yu Watanabe [Fri, 1 Mar 2024 01:37:51 +0000 (10:37 +0900)] 
sd-dhcp-server: also expose lease expiration timestamp in realtime

Here, we use map_clock_usec_raw(), instead of map_clock_usec() to reduce
number of calls of now() -> clock_gettime().

19 months agotime-util: expose map_clock_usec_internal() as map_clock_usec_raw()
Yu Watanabe [Wed, 6 Mar 2024 00:57:06 +0000 (09:57 +0900)] 
time-util: expose map_clock_usec_internal() as map_clock_usec_raw()

This will be used later.

19 months agosd-dhcp-server-lease: move functions to build json format
Yu Watanabe [Tue, 2 Jan 2024 21:07:05 +0000 (06:07 +0900)] 
sd-dhcp-server-lease: move functions to build json format

No functional change, just preparation for later commits.

19 months agosd-dhcp-server: refuse invalid hostname in request
Yu Watanabe [Mon, 11 Mar 2024 16:47:17 +0000 (01:47 +0900)] 
sd-dhcp-server: refuse invalid hostname in request

Currently, the received hostname is not used for assigning an address to
the host, or options in the subsequent reply message. But, the parsed
hostname is exposed through DBus, and possibly Varlink in the future.
Let's ignore spurious hostname.

19 months agodhcp-option: refuse control and non-UTF8 characters in string option
Yu Watanabe [Mon, 11 Mar 2024 16:32:03 +0000 (01:32 +0900)] 
dhcp-option: refuse control and non-UTF8 characters in string option

We oftem save parsed DHCP options into a file, or expose them
through DBus or Varlink. In such case, control characters or non-UTF8
characters may cause many kind of unexpected errors. In general, a DHCP
message that have string options with spurious characters is mostly
malformed or broken. Let's refuse them.

This also makes dhcp_option_parse_string() do not free 'ret' argument,
to follow our usual coding style. So, callers now need to free the
pre-exisitng string if necessary.

Fixes #31708.

19 months agotest-network: add support for systemd-networkd-persistent-storage.service
Yu Watanabe [Fri, 1 Mar 2024 03:09:00 +0000 (12:09 +0900)] 
test-network: add support for systemd-networkd-persistent-storage.service

19 months agonetworkctl: introduce "persistent-storage" command
Yu Watanabe [Mon, 26 Feb 2024 01:33:20 +0000 (10:33 +0900)] 
networkctl: introduce "persistent-storage" command

Then, this introduces systemd-networkd-persistent-storage.service.

systemd-networkd.service is an early starting service. So, at the time
it is started, the persistent storage for the service may not be ready,
and we cannot use StateDirectory=systemd/network in
systemd-networkd.service.

The newly added systemd-networkd-persistent-storage.service creates the
state directory for networkd, and notify systemd-networkd that the
directory is usable.

19 months agonetwork/varlink: introduce io.systemd.Network.SetPersistentStorage method
Yu Watanabe [Fri, 1 Mar 2024 02:21:56 +0000 (11:21 +0900)] 
network/varlink: introduce io.systemd.Network.SetPersistentStorage method

And make the networkd use state directory.

Currently, the state directory and the method are not used, but will be used later.

19 months agodata-fd-util: Fixup header
Adrian Vovk [Mon, 11 Mar 2024 16:23:06 +0000 (12:23 -0400)] 
data-fd-util: Fixup header

inttypes.h doesn't define size_t

19 months agotest-network: copy system unit files from build or source directory
Yu Watanabe [Fri, 1 Mar 2024 04:38:59 +0000 (13:38 +0900)] 
test-network: copy system unit files from build or source directory

Addresses https://github.com/systemd/systemd/pull/30021#issuecomment-1971090682.

19 months agotest-network: drop unused options and variables
Yu Watanabe [Fri, 1 Mar 2024 04:21:20 +0000 (13:21 +0900)] 
test-network: drop unused options and variables

This also renames several variables, and replace RuntimeError with
assert.

19 months agopidref: use fd_inode_same to compare pidfds 31713/head
Mike Yuan [Mon, 11 Mar 2024 08:41:51 +0000 (16:41 +0800)] 
pidref: use fd_inode_same to compare pidfds

19 months agostat-util: struct stat could be initialized with (st_mode & S_IFMT == 0)
Mike Yuan [Mon, 11 Mar 2024 10:27:50 +0000 (18:27 +0800)] 
stat-util: struct stat could be initialized with (st_mode & S_IFMT == 0)

For anonymous inodes, the result would be 0, but
the struct stat is initialized obviously.
So let's switch to st_dev for the check, which
is guaranteed to be non-zero.

Also this is completely unnecessary for statx(),
since we check stx_mask first and that on its own
denotes that the struct is initialized.

19 months agostat-util: introduce fd_inode_same
Mike Yuan [Mon, 11 Mar 2024 08:28:30 +0000 (16:28 +0800)] 
stat-util: introduce fd_inode_same

19 months agopolkit: update the rest of bus_verify_polkit_async_full() calls to new flags parameter
Luca Boccassi [Mon, 11 Mar 2024 12:15:52 +0000 (12:15 +0000)] 
polkit: update the rest of bus_verify_polkit_async_full() calls to new flags parameter

Looks like the compiler doesn't even notice these were left over
as the types end up matching somehow

Follow-up for 29556b75d8025580eebe160a1fa1459965912ee2

19 months agofd-util: beef up fd_verify_safe_flags() features
Lennart Poettering [Tue, 27 Feb 2024 16:50:45 +0000 (17:50 +0100)] 
fd-util: beef up fd_verify_safe_flags() features

Let's make fd_verify_safe_flags() even more useful:

1. let's return the cleaned up flags (i.e. just the access mode) after
   validation, hiding all the noise, such as O_NOFOLLOW, O_LARGEFILE and
   similar.

2. let's add a "full" version of the call that allows passing additional
   flags that are OK to be set.

19 months agoshared/service-util: actually use the `bus_introspect` argument in `help()` 31721/head
Antonio Alvarez Feijoo [Mon, 11 Mar 2024 12:56:30 +0000 (13:56 +0100)] 
shared/service-util: actually use the `bus_introspect` argument in `help()`

If `bus_introspect` is false, do not print the `--bus-introspect=PATH` option.

Also, modernize help output.

19 months agoMerge pull request #31711 from YHNdnzj/gpt-auto-has-node
Luca Boccassi [Mon, 11 Mar 2024 12:40:22 +0000 (12:40 +0000)] 
Merge pull request #31711 from YHNdnzj/gpt-auto-has-node

gpt-auto: ignore fstab_has_node failure

19 months agotree-wide: drop custom formatting for print() help messages
Antonio Alvarez Feijoo [Mon, 11 Mar 2024 12:34:34 +0000 (13:34 +0100)] 
tree-wide: drop custom formatting for print() help messages

Follow-up for bc556335b1c568c98688cc1f586b5f753fcddac6

19 months agopolkit: turn "interactive" flag to polkit APIs into a proper flags field (#31715)
Lennart Poettering [Mon, 11 Mar 2024 11:57:45 +0000 (12:57 +0100)] 
polkit: turn "interactive" flag to polkit APIs into a proper flags field (#31715)

This adds for both the D-Bus and the Varlink flavours of our polkit
client api a flags parameter. And then folds the "bool interactive" flag
that the D-Bus version so far had, into a flag, and also adds support
for it in the Varlink API.

Since this means the Varlink API gained another parameter, let's do what
we already did for the D-Bus API and add a _full() version of the API
that has the flags and the good_uid parameter, and one without both.

19 months agobasic: add PIDFS magic (#31709)
cpackham-atlnz [Mon, 11 Mar 2024 11:55:36 +0000 (00:55 +1300)] 
basic: add PIDFS magic (#31709)

Kernel commit cb12fd8e0dabb9a1c8aef55a6a41e2c255fcdf4b added pidfs.
Update filesystems-gperf.gperf and missing_magic.h accordingly.

This fixes the following error building against a bleeding edge kernel.
```
../src/basic/meson.build:234:8: ERROR: Problem encountered: Unknown filesystems defined in kernel headers:

Filesystem found in kernel header but not in filesystems-gperf.gperf: PID_FS_MAGIC
```

19 months agopo: Translated using Weblate (Russian)
Sergey A [Mon, 11 Mar 2024 11:36:03 +0000 (12:36 +0100)] 
po: Translated using Weblate (Russian)

Currently translated at 100.0% (233 of 233 strings)

Co-authored-by: Sergey A <sw@atrus.ru>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/ru/
Translation: systemd/main

19 months agosemaphore: remove workaround for adduser
Luca Boccassi [Mon, 11 Mar 2024 10:20:20 +0000 (10:20 +0000)] 
semaphore: remove workaround for adduser

Offending commit has been reverted, so it's no longer necessary:

https://salsa.debian.org/ci-team/autopkgtest/-/commit/90167696914889efa782aac3f1f44ab68498c529

Follow-up for 8b7485c505f1e7a55896069224109adaf10c16b9

19 months agopolkit: trivial simplification
Lennart Poettering [Wed, 28 Feb 2024 20:56:35 +0000 (21:56 +0100)] 
polkit: trivial simplification

19 months agoMerge pull request #31706 from DaanDeMeyer/smbios
Luca Boccassi [Mon, 11 Mar 2024 10:44:11 +0000 (10:44 +0000)] 
Merge pull request #31706 from DaanDeMeyer/smbios

systemd-boot: Add support for reading extra kernel cmdline from SMBIOS

19 months agoMerge pull request #31675 from rpigott/dns-refuse
Luca Boccassi [Mon, 11 Mar 2024 10:43:18 +0000 (10:43 +0000)] 
Merge pull request #31675 from rpigott/dns-refuse

resolved: refuse queries with no suitable scope

19 months agofuzz: save/load DHCP client leases 31716/head
Evgeny Vereshchagin [Mon, 11 Mar 2024 05:46:21 +0000 (05:46 +0000)] 
fuzz: save/load DHCP client leases

to make sure it more or less works with all sorts of leases.

Prompted by https://github.com/systemd/systemd/pull/30021#discussion_r1519123802

19 months agoMerge pull request #31692 from bluca/semaphore_autopkgtest_fixes
Frantisek Sumsal [Mon, 11 Mar 2024 09:00:58 +0000 (10:00 +0100)] 
Merge pull request #31692 from bluca/semaphore_autopkgtest_fixes

semaphore: move back to autopkgtest master branch and rearrange build deps

19 months agogpt-auto: ignore fstab_has_node failure 31711/head
Mike Yuan [Mon, 11 Mar 2024 07:29:41 +0000 (15:29 +0800)] 
gpt-auto: ignore fstab_has_node failure

After 8a1326581d9b066377f8d9f2d58e1bdfd8b645d0,
we always check whether there're mounts under
/boot/ or /efi/ first. Let's relax the check
for fstab_has_node hence, since on initrd-less
systems it might produce wrong results.

19 months agofstab-util: remove unreachable return
Mike Yuan [Mon, 11 Mar 2024 07:27:04 +0000 (15:27 +0800)] 
fstab-util: remove unreachable return

19 months agohwdb: Add touchpad configuration for ThinkPad E495
İ. Ensar Gülşen [Sun, 10 Mar 2024 14:52:15 +0000 (17:52 +0300)] 
hwdb: Add touchpad configuration for ThinkPad E495

19 months agoman: Mention that SMBIOS type 11 strings are ignored inside CVM 31706/head
Daan De Meyer [Sun, 10 Mar 2024 20:24:52 +0000 (21:24 +0100)] 
man: Mention that SMBIOS type 11 strings are ignored inside CVM

19 months agoMerge pull request #31705 from YHNdnzj/quotacheck-followup
Luca Boccassi [Sun, 10 Mar 2024 19:58:01 +0000 (19:58 +0000)] 
Merge pull request #31705 from YHNdnzj/quotacheck-followup

Some follow-ups for quotacheck

19 months agoman: fix systemd-measure manpage conditional
Luca Boccassi [Sun, 10 Mar 2024 13:08:58 +0000 (13:08 +0000)] 
man: fix systemd-measure manpage conditional

Follow-up for ec3cf73f303cf99ba73c91b734401b3ad2c218e9

19 months agoman/systemd-hibernate-resume: generator now enables rather than creates the service
Mike Yuan [Sun, 10 Mar 2024 14:44:02 +0000 (22:44 +0800)] 
man/systemd-hibernate-resume: generator now enables rather than creates the service

Follow-up for a628d933cc67cc8b183dc809ba1451aa5b2996e5

19 months agosystemd-boot: Add support for reading extra kernel cmdline from SMBIOS
Daan De Meyer [Sun, 10 Mar 2024 15:24:37 +0000 (16:24 +0100)] 
systemd-boot: Add support for reading extra kernel cmdline from SMBIOS

Same as io.systemd.stub.kernel-cmdline-extra, but for type 1 entries
booted by systemd-boot.

19 months agoquotacheck: store argv[*] in static var 31705/head
Mike Yuan [Sun, 10 Mar 2024 15:11:47 +0000 (23:11 +0800)] 
quotacheck: store argv[*] in static var

As per our coding style

19 months agoquotacheck: minor modernization
Mike Yuan [Sun, 10 Mar 2024 15:08:34 +0000 (23:08 +0800)] 
quotacheck: minor modernization

19 months agounits: make quota services bind to corresponding mount units
Mike Yuan [Sun, 10 Mar 2024 14:57:22 +0000 (22:57 +0800)] 
units: make quota services bind to corresponding mount units

Follow-up for a628d933cc67cc8b183dc809ba1451aa5b2996e5

systemd-growfs@.service does the same.

19 months agomkosi: fix typo
Yu Watanabe [Sun, 10 Mar 2024 05:09:38 +0000 (14:09 +0900)] 
mkosi: fix typo

Follow-up for 4d0f1451b58dbd4b94da579b800adef4f4e42c34.

20 months agounits: make templates for quotaon and systemd-quotacheck service
Thomas Blume [Mon, 19 Sep 2022 14:57:48 +0000 (16:57 +0200)] 
units: make templates for quotaon and systemd-quotacheck service

20 months agosemaphore: drop some manual build deps, handled by package 31692/head
Luca Boccassi [Sat, 9 Mar 2024 12:43:36 +0000 (12:43 +0000)] 
semaphore: drop some manual build deps, handled by package

The package now pulls in more dependencies, so can drop some. Also we don't need libarchive-dev
and libcurl4-openssl-dev from backports.

20 months agosemaphore: move back to autopkgtest master branch
Luca Boccassi [Sat, 9 Mar 2024 12:42:32 +0000 (12:42 +0000)] 
semaphore: move back to autopkgtest master branch

Instead of fixing the commit, we can workaround the adduser issue by
simply creating a user manually beforehand, which means the broken
codepath in autopkgtest is not taken. We can remove it once it's
fixed upstream, which is in progress:

https://salsa.debian.org/ci-team/autopkgtest/-/merge_requests/297

20 months agocore/exec-invoke: Fix missing arguments for PR_SET_MEMORY_MERGE call
Vasiliy Stelmachenok [Fri, 8 Mar 2024 14:58:18 +0000 (17:58 +0300)] 
core/exec-invoke: Fix missing arguments for PR_SET_MEMORY_MERGE call

Without it prctl will always fail, even if using a kernel version that
supports the PR_SET_MEMORY_MERGE call.

20 months agoresolved: also reply NOTIMP when refusing a query based on RR type 31675/head
Ronan Pigott [Fri, 8 Mar 2024 21:48:03 +0000 (14:48 -0700)] 
resolved: also reply NOTIMP when refusing a query based on RR type

In some cases we refuse a query based on the RR type, mostly old
deprecated types. Let's return NOTIMP in this case, which best
communicates why the query failed.

20 months agoextract-word: increase test-extract-word coverage for unicode inputs
Chandra Pratap [Fri, 8 Mar 2024 14:37:29 +0000 (20:07 +0530)] 
extract-word: increase test-extract-word coverage for unicode inputs

In the current testing scheme in test-extract-word, we only
have two test cases covering unicode strings. Improve upon
this by adding more cases for the same.

Signed-off-by: Chandra Pratap <chandrapratap3519@gmail.com>
20 months agoadd unittest cases for argv_looks_like_help
Abraham Samuel Adekunle [Fri, 8 Mar 2024 13:04:41 +0000 (14:04 +0100)] 
add unittest cases for argv_looks_like_help

20 months agoAdded a new test to cover login-util.c
Unique-Usman [Fri, 8 Mar 2024 11:41:14 +0000 (17:11 +0530)] 
Added a new test to cover login-util.c

20 months agoman/kernel-install: add `add-all` command to synopsis
Antonio Alvarez Feijoo [Fri, 8 Mar 2024 11:30:30 +0000 (12:30 +0100)] 
man/kernel-install: add `add-all` command to synopsis

20 months agomkosi: Add BuildSourcesEphemeral=yes
Daan De Meyer [Fri, 8 Mar 2024 18:12:16 +0000 (19:12 +0100)] 
mkosi: Add BuildSourcesEphemeral=yes

Required to make sure that any changes packaging specs make to the
source files are thrown away after the build so they don't mess with
the source tree.

20 months agomkosi: fix typo
Yu Watanabe [Fri, 8 Mar 2024 16:47:30 +0000 (01:47 +0900)] 
mkosi: fix typo

Follow-up for 4d0f1451b58dbd4b94da579b800adef4f4e42c34.

20 months agoresolve: fix typo
Yu Watanabe [Fri, 8 Mar 2024 16:43:46 +0000 (01:43 +0900)] 
resolve: fix typo

Follow-up for d08566fad7c97df153d38e314670aea3822106e1.

20 months agobootctl: additional fixes for local/global UKI PE addons
Emanuele Giuseppe Esposito [Thu, 15 Feb 2024 14:25:15 +0000 (09:25 -0500)] 
bootctl: additional fixes for local/global UKI PE addons

Fix various memory leaks and names used in
https://github.com/systemd/systemd/pull/28761.

20 months agoMerge pull request #30480 from keszybz/kernel-install-more-paths
Zbigniew Jędrzejewski-Szmek [Fri, 8 Mar 2024 07:25:07 +0000 (08:25 +0100)] 
Merge pull request #30480 from keszybz/kernel-install-more-paths

Read kernel-install config from /run/kernel too

20 months agoresolved: don't cache NXDOMAIN for SUDN resolver.arpa
Ronan Pigott [Wed, 6 Mar 2024 02:03:16 +0000 (19:03 -0700)] 
resolved: don't cache NXDOMAIN for SUDN resolver.arpa

The name resolver.arpa is reserved for RFC9462 "Discovery of Designated
Resolvers" (DDR). This relies on regular dns queries for SVCB records at
the special use domain name _dns.resolver.arpa. Unfortunately, older
nameservers (or broken ones) won't know about this SUDN and will likely
return NXDOMAIN. If this is cached, the cache entry will become an
impediment for any clients trying to discover designated resolvers
through the stub-resolver, or potentially even sd-resolved itself, were
it to implement DDR.

The RFC recommendation is that "clients MUST NOT perform A or AAAA
queries for resolver.arpa", and "resolvers SHOULD respond to queries of
any type other than SVCB for _dns.resolver.arpa. with NODATA and queries
of any type for any domain name under resolver.arpa with NODATA." which
should help avoid potential compatibility issues. This enforces that
condition within sd-resolved, and avoids caching any such erroneous
NXDOMAIN.

The RFC also recommends requests for this domain should never be
forwarded, to prevent authentication failures. Since there isn't much
point in establishing secure communication to the local stub, we still
allow SVCB to be forwarded from the stub, in case the client cares to
implement some other authentication method and understands the
consequences of skipping the local stub. Normal clients are not
expected to implement DDR, but this change will protect sd-resolved's
own caches in case they try.

Although A and AAAA are prohibited, I think validating resolvers
might reasonably query for dnssec records, even though the resolver.arpa
zone does not exist (it is declared to be a locally served zone). For
this reason, I have also added resolver.arpa to the builtin dnssec NTA.

20 months agoAdd more unit test to cover the uid_range_covers inside the uid-range.c file (#31666)
Unique-Usman [Thu, 7 Mar 2024 22:59:13 +0000 (04:29 +0530)] 
Add more unit test to cover the  uid_range_covers inside the uid-range.c file (#31666)

* Add more unit test to cover the  uid_range_covers inside the uid-range.c file

20 months agoAdded a unit test to cover af_to_name in af-list.c
Unique-Usman [Thu, 7 Mar 2024 14:47:44 +0000 (20:17 +0530)] 
Added a unit test to cover af_to_name in af-list.c

20 months agologind-dbus: count user-early sessions in verify_shutdown_creds too
Mike Yuan [Thu, 7 Mar 2024 14:22:30 +0000 (22:22 +0800)] 
logind-dbus: count user-early sessions in verify_shutdown_creds too

Follow-up for 59afe07c217c73e3c7c19fb06aef2ff7bf609fd2

20 months agoMerge pull request #31659 from YHNdnzj/freezer-followup
Luca Boccassi [Thu, 7 Mar 2024 22:55:56 +0000 (22:55 +0000)] 
Merge pull request #31659 from YHNdnzj/freezer-followup

Freezer trivial follow-up

20 months agoresolved: refuse queries with no suitable scope
Ronan Pigott [Thu, 7 Mar 2024 21:27:52 +0000 (14:27 -0700)] 
resolved: refuse queries with no suitable scope

In some cases there is no configured server to answer a given question,
because all scopes refused the query. In this case we currently return
rcode SERVFAIL.

In dns it is customary for authoritative nameservers to return REFUSED
where the question is outside of their authority. This is better than
SERVFAIL because it informs the client that they aren't likely to get an
answer out of us anytime soon, and either the configuration, or the
query, need to change.

Similar logic invites us to use use the rcode REFUSED on the stub if we
aren't configured with any suitable scope for this question.

20 months agoshared/conf-parser: add two more annotations 30480/head
Zbigniew Jędrzejewski-Szmek [Thu, 7 Mar 2024 17:47:31 +0000 (18:47 +0100)] 
shared/conf-parser: add two more annotations

20 months agobootctl: use the full parser too
Zbigniew Jędrzejewski-Szmek [Wed, 21 Feb 2024 22:44:09 +0000 (23:44 +0100)] 
bootctl: use the full parser too

20 months agokernel-install: support full set of config files and drop-ins
Zbigniew Jędrzejewski-Szmek [Wed, 21 Feb 2024 12:41:57 +0000 (13:41 +0100)] 
kernel-install: support full set of config files and drop-ins

This brings the handling of config for kernel-install in line with most of
systemd, i.e. we search the set of paths for the main config file, and the full
set of drop-in paths for drop-ins.

This mirrors what 07f5e35fe7967c824a87f18a3a1d3c22e5be70f5 did for udev.conf.
That change worked out fine, so I hope this one will too.

The update in the man page is minimal. I think we should split out a separate
page for the config file later on.

One motivating use case is to allow a drop-in to be created for temporary
config overrides and then removed after the operation is done.

20 months agoman: document all the new paths
Zbigniew Jędrzejewski-Szmek [Thu, 22 Feb 2024 09:58:48 +0000 (10:58 +0100)] 
man: document all the new paths