]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
3 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.

3 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
```

3 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

3 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

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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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.

3 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

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

3 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.

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

Follow-up for 4d0f1451b58dbd4b94da579b800adef4f4e42c34.

3 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

3 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.

3 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

3 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.

3 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.

3 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>
3 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

3 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

3 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

3 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.

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

Follow-up for 4d0f1451b58dbd4b94da579b800adef4f4e42c34.

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

Follow-up for d08566fad7c97df153d38e314670aea3822106e1.

3 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.

3 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

3 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.

3 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

3 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

3 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

3 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

3 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.

3 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

3 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

3 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.

3 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

3 months agovarious: use new config loader instead of config_parse_config_file()
Zbigniew Jędrzejewski-Szmek [Thu, 22 Feb 2024 09:50:05 +0000 (10:50 +0100)] 
various: use new config loader instead of config_parse_config_file()

This means the main config file is loaded also from /run and /usr.

We should load the main config file from all the places where we load drop-ins.

I realize I had a giant blind spot: I always assumed that we load config files
from /etc, /run, /usr/local/lib, /usr/lib. But it turns out that we only used
those paths for drop-ins. For the main config file, we only looked in /etc. The
docs actually partially described this behaviour, i.e. most SYNOPSIS sections
and some parts of the text, but not others.

This is strange, because 6495361c7d5e8bf640841d1292ef6cfe1ea244cf was completely
bogus with the behaviour before this patch. We had a huge discussion before it
was merged, and clearly nobody noticed this. Similarly, in the previous version
of the current pull request, we had a long discussion about the appropriate
order of directories, and apparently nobody noticed that there was no order,
because only looked in one directory. So the blind spot seems to have been
shared.

Also, systemd-analyze cat-config behaved incorrectly, i.e. its behaviour matches
the new behaviour.

Possibly, in the future it'll make it easier to add support for --root.

3 months agoshared/conf-parser: add function which implements the standard config file set
Zbigniew Jędrzejewski-Szmek [Wed, 21 Feb 2024 21:31:41 +0000 (22:31 +0100)] 
shared/conf-parser: add function which implements the standard config file set

Also allow config_parse_many() to be called for config files without
sections. The test uses such a file.

3 months agoshared/conf-parser: use chase() in config_parse_many_files()
Zbigniew Jędrzejewski-Szmek [Wed, 21 Feb 2024 21:29:56 +0000 (22:29 +0100)] 
shared/conf-parser: use chase() in config_parse_many_files()

The function was partially implementing chroot lookups. It would be given
file names that were prefixed with the chroot, so it would mostly work.
But if any of those files were symlinks, fopen() would do the wrong thing.

Also we don't need locking.

So give 'root' as the argument and use chase_and_fopen_unlocked() to get
proper chroot-aware lookups.

The only place where config_parse_many() is called with root is is repart.c.
So this is a follow-up for e594a3b154bd06c535a934a1cc7231b1ef76df73 and
34f2fd5096cdb26ef57998740b1b876332d968fc.

3 months agostrv: add helper to extend strv from both sides
Zbigniew Jędrzejewski-Szmek [Thu, 22 Feb 2024 09:47:23 +0000 (10:47 +0100)] 
strv: add helper to extend strv from both sides

Also, use the more correct type of 'const char* const*' for the input strv.
This requires adding the cast in a few places, but also allows to remove some
casts in others.

3 months agoudevd: inline iterator variable
Zbigniew Jędrzejewski-Szmek [Wed, 21 Feb 2024 13:09:52 +0000 (14:09 +0100)] 
udevd: inline iterator variable

3 months agoudev,backlight,kernel-install: reword sentences starting with "Skipping to"
Zbigniew Jędrzejewski-Szmek [Wed, 21 Feb 2024 11:38:27 +0000 (12:38 +0100)] 
udev,backlight,kernel-install: reword sentences starting with "Skipping to"

That's not gramatically correct.

In backlight, change "assocation" to "deduplication". Without the context,
it's probably not clear at all that we "associate" them to ignore them.

3 months agoshared/pretty-print: rename output parameters
Zbigniew Jędrzejewski-Szmek [Thu, 22 Feb 2024 09:36:52 +0000 (10:36 +0100)] 
shared/pretty-print: rename output parameters

3 months agoshared/conf-parser: collapse pkgdir and conf_file args into one
Zbigniew Jędrzejewski-Szmek [Thu, 25 Jan 2024 17:30:43 +0000 (18:30 +0100)] 
shared/conf-parser: collapse pkgdir and conf_file args into one

This essentially reverts 5656cdfeeabc16b5489f5ec7a0a36025a2ec1f23. I find it
much easier to understand what is going on when the
path-relative-to-the-search-path is passed in full, instead of being constructed
from two parts, with one of the parts being implicit in some places.

Also, we call 'systemd-analyze cat-config <path>' with <path> with the same
meaning, so this makes the internal and external APIs more consistent.

3 months agoconstants: drop duplicated CONF_PATHS defines
Zbigniew Jędrzejewski-Szmek [Thu, 14 Dec 2023 09:52:34 +0000 (10:52 +0100)] 
constants: drop duplicated CONF_PATHS defines

Follow-up for b0d3095fd6cc1791a38f57a1982116b4475244ba.

3 months agosleep: fix typo (sysupend -> suspend) 31659/head
Mike Yuan [Wed, 6 Mar 2024 18:53:43 +0000 (02:53 +0800)] 
sleep: fix typo (sysupend -> suspend)

3 months agobus-unit-util: trivial follow-up for UnitFreezer
Mike Yuan [Wed, 6 Mar 2024 18:23:39 +0000 (02:23 +0800)] 
bus-unit-util: trivial follow-up for UnitFreezer

Follow-up for 7483708131b474d92c9207c8c6340b450b58cb94

Make sure that function param names match between
source and header. Also, place UnitFreezer params
in front.

3 months agobus-unit-util: define FREEZE_BUS_CALL_TIMEOUT locally
Mike Yuan [Wed, 6 Mar 2024 18:20:26 +0000 (02:20 +0800)] 
bus-unit-util: define FREEZE_BUS_CALL_TIMEOUT locally

Follow-up for f274f8bf256702c5fd0c68d3f7bd6aeba74dfcf0

We define *_SLOW_BUS_CALL_TIMEOUT in each component's
own file too. This one is no different and doesn't need
to be in constants.h IMO.

3 months agoman/resolve: update DNSSEC description
Ronan Pigott [Thu, 7 Mar 2024 01:08:00 +0000 (18:08 -0700)] 
man/resolve: update DNSSEC description

This behavior was changed.

Fixes: 9c47b334445a ("resolved: enable DNS proxy mode if client wants DNSSEC")
3 months agoMerge pull request #31590 from YHNdnzj/install-cleanup
Luca Boccassi [Thu, 7 Mar 2024 11:28:04 +0000 (11:28 +0000)] 
Merge pull request #31590 from YHNdnzj/install-cleanup

shared/install: several cleanups

3 months agoMerge pull request #31628 from YHNdnzj/tmpfiles-acl
Luca Boccassi [Thu, 7 Mar 2024 11:27:15 +0000 (11:27 +0000)] 
Merge pull request #31628 from YHNdnzj/tmpfiles-acl

tmpfiles: fix for 'X' bit handling and use it where appropriate

3 months agoloongarch64: disable simd when build efi
Xiaotian Wu [Wed, 27 Dec 2023 08:25:22 +0000 (16:25 +0800)] 
loongarch64: disable simd when build efi

LoongArch does not yet support the `-mgeneral-regs-only` option, so when
compiling for EFI, we need to use the `-mno-lsx` and `-mno-lasx` options
to disable SIMD instructions.

3 months agoMerge pull request #31345 from DaanDeMeyer/mkosi-packages
Daan De Meyer [Thu, 7 Mar 2024 10:12:14 +0000 (11:12 +0100)] 
Merge pull request #31345 from DaanDeMeyer/mkosi-packages

Build distribution packages in mkosi

3 months agoBuild distribution packages in mkosi 31345/head
Daan De Meyer [Thu, 25 Jan 2024 21:48:55 +0000 (22:48 +0100)] 
Build distribution packages in mkosi

Instead of running meson install and hoping for the best, let's build
distribution packages from the downstream packaging specs. This gets
us the following:

- Vastly simplified mkosi scripts since we don't need a separate initrd
  image anymore but can just reuse the default mkosi initrd.
- Almost everything can move to the base image as its not the basis
  anymore for the initrd and as such we don't need to care about the
  size anymore.
- The systemd packages that get pulled in as dependencies of other
  packages get properly uninstalled and replaced with our packages that
  we built instead of just installing on top of an existing systemd
  installation with no guarantee that everything from that previous
  installation was removed.
- Much better testing coverage as what we're testing is much closer
  to what will actually be deployed in distributions.
- Immediate feedback if something we change breaks distribution packaging
- We get integration with the distribution for free as we'll automatically
  use the proper directories and such instead of having to hack this
  into a mkosi build script.
- ...

3 months agomkosi: Update to v21
Daan De Meyer [Sun, 18 Feb 2024 17:51:58 +0000 (18:51 +0100)] 
mkosi: Update to v21

3 months agoMerge pull request #31664 from bluca/coverity
Mike Yuan [Thu, 7 Mar 2024 08:02:57 +0000 (16:02 +0800)] 
Merge pull request #31664 from bluca/coverity

Coverity fixes

3 months agoUpdate catalog.c - Removing sanity check as there is no need of checking non null...
SidhuRupinder [Thu, 7 Mar 2024 01:31:59 +0000 (07:01 +0530)] 
Update catalog.c - Removing sanity check as there is no need of checking non null pointer (#31653)

There is no need to check the pointer as the pointer will never be NULL.

Co-authored-by: Frantisek Sumsal <frantisek@sumsal.cz>
3 months agoMerge pull request #31616 from poettering/resolved-varlink-resolve-record
Luca Boccassi [Thu, 7 Mar 2024 01:00:27 +0000 (01:00 +0000)] 
Merge pull request #31616 from poettering/resolved-varlink-resolve-record

resolved: add varlink API for resolving raw RRs

3 months agoresolve: disambiguate return statement 31664/head
Luca Boccassi [Thu, 7 Mar 2024 00:51:43 +0000 (00:51 +0000)] 
resolve: disambiguate return statement

This works as expected, but coverity warns that it could be ambiguous and context
suggests the other way around. Add brackets to disambiguate.

CID#1535101

Follow-up for 6399be223b73ce520654242ad08de387b08b738a

3 months agoescape: fix operator precedence in overflow check
Luca Boccassi [Thu, 7 Mar 2024 00:46:19 +0000 (00:46 +0000)] 
escape: fix operator precedence in overflow check

CID#1535100

Follow-up for c6342e35b07f750771f0fdb3c80a27d3272e8001

3 months agoman: fix systemd-timedated man page wrt ntp-units.d
Michael Biebl [Wed, 6 Mar 2024 18:19:41 +0000 (19:19 +0100)] 
man: fix systemd-timedated man page wrt ntp-units.d

The service parsing/using this directory is systemd-timedated, not
systemd-timesyncd.

3 months agotmpfiles.d/systemd: use ACL 'X' bit where appropriate 31628/head
Mike Yuan [Tue, 5 Mar 2024 09:16:49 +0000 (17:16 +0800)] 
tmpfiles.d/systemd: use ACL 'X' bit where appropriate

3 months agotmpfiles: do 'X' bit check in an ACL-aware manner
Mike Yuan [Tue, 5 Mar 2024 14:25:44 +0000 (22:25 +0800)] 
tmpfiles: do 'X' bit check in an ACL-aware manner

Follow-up for 26d98cdd78cb5283f5771bd5866997acc494b067

I.e. stat() cannot be used here.

Also, before this commit, the 'X' is only applied if
the owner has execute bit set. Now it takes group and
other into consideration too. setfacl(1) also has
the same behavior.

3 months agotmpfiles: remove one more use of goto and modernization
Mike Yuan [Tue, 5 Mar 2024 14:41:54 +0000 (22:41 +0800)] 
tmpfiles: remove one more use of goto and modernization

3 months agocore,install: generalize install error handling 31590/head
Mike Yuan [Thu, 29 Feb 2024 12:58:17 +0000 (20:58 +0800)] 
core,install: generalize install error handling

3 months agoshared/install: use FOREACH_ARRAY at one more place
Mike Yuan [Thu, 29 Feb 2024 13:04:02 +0000 (21:04 +0800)] 
shared/install: use FOREACH_ARRAY at one more place

3 months agoshared/install: use RET_GATHER more
Mike Yuan [Thu, 29 Feb 2024 10:53:26 +0000 (18:53 +0800)] 
shared/install: use RET_GATHER more

3 months agopath-lookup: rename lookup_paths_free -> _done
Mike Yuan [Sat, 2 Mar 2024 08:38:17 +0000 (16:38 +0800)] 
path-lookup: rename lookup_paths_free -> _done

This is stack-allocated, so update to match our usual rules.

3 months agoresolved: expose raw RR resolver via Varlink too 31616/head
Lennart Poettering [Mon, 4 Mar 2024 10:22:41 +0000 (11:22 +0100)] 
resolved: expose raw RR resolver via Varlink too

Now that we have an address, hostname, and service resolve, at the last
kind of resovler we expose over D-Bus also to Varlink.

3 months agoresolved: move ResourceKey/ResourceRecord varlink types to generic Resolve interface
Lennart Poettering [Mon, 4 Mar 2024 09:18:36 +0000 (10:18 +0100)] 
resolved: move ResourceKey/ResourceRecord varlink types to generic Resolve interface

Let's define this in the generic interface and then import it into the
Monitor interface too.

This is preparation for adding an interface to resolve arbitrary RRs via
Varlink, which means we want the type in both interfaces.

3 months agoresolved: decrease mdns/llmnr priority for the reverse mapping domains
Ronan Pigott [Wed, 6 Mar 2024 01:05:57 +0000 (18:05 -0700)] 
resolved: decrease mdns/llmnr priority for the reverse mapping domains

Previously all queries to the reverse mapping domains (in-addr.arpa and
ip6.arpa) were considered to be in-scope for mdns and llmnr at the same
priority as DNS. This caused sd-resolved to ignore NXDOMAIN responses
from dns in favor of lengthy timeouts.

This narrows the scope of mdns and llmnr so they are not invariably
considered as fallbacks for these domains. Now, mdns/llmnr on a link
will only be used as a fallback when there is no suitable DNS scope, and
when that link is DefaultRoute.

3 months agoMerge pull request #30612 from AdrianVovk/sleep-freeze-user-seesions
Lennart Poettering [Wed, 6 Mar 2024 17:52:57 +0000 (18:52 +0100)] 
Merge pull request #30612 from AdrianVovk/sleep-freeze-user-seesions

Freeze user sessions for all types of sleep

3 months agoMerge pull request #31592 from YHNdnzj/exit-cgroup-notify
Lennart Poettering [Wed, 6 Mar 2024 17:38:51 +0000 (18:38 +0100)] 
Merge pull request #31592 from YHNdnzj/exit-cgroup-notify

core/service: two fixes for ExitType=cgroup

3 months agomeson: add missing dependency to libdl
Yu Watanabe [Wed, 6 Mar 2024 09:44:43 +0000 (18:44 +0900)] 
meson: add missing dependency to libdl

Follow-up for 1c20c9f4fce3b2eb501a776fb6025d6b5567fc00.

Fixes https://github.com/systemd/systemd/pull/31550#issuecomment-1980458377.

3 months agoMerge pull request #31657 from mrc0mmand/test-execute-shenanigans
Luca Boccassi [Wed, 6 Mar 2024 17:22:39 +0000 (17:22 +0000)] 
Merge pull request #31657 from mrc0mmand/test-execute-shenanigans

A couple of tweaks for test-execute

3 months agoMerge pull request #31656 from DaanDeMeyer/meson
Daan De Meyer [Wed, 6 Mar 2024 15:20:13 +0000 (16:20 +0100)] 
Merge pull request #31656 from DaanDeMeyer/meson

meson: Remove version_h dependency from jinja2_cmdline

3 months agoci: explicitly change oom-{score}-adj before running tests 31657/head
Frantisek Sumsal [Wed, 6 Mar 2024 14:21:10 +0000 (15:21 +0100)] 
ci: explicitly change oom-{score}-adj before running tests

For some reason root in GH actions is able to _decrease_ its oom score
even after dropping all capabilities (including CAP_SYS_RESOURCE), until
the oom score is changed explicitly after sudo:

$ systemd-detect-virt
microsoft
$ sudo su -
~# capsh --drop=all -- -c 'capsh --print; grep -H . /proc/self/oom*; choom -p $$ -n -101'
Current: =
Bounding set =
Ambient set =
Current IAB: !cap_chown,!cap_dac_override,!cap_dac_read_search,...,!cap_sys_resource,...,!cap_checkpoint_restore
Securebits: 00/0x0/1'b0
 secure-noroot: no (unlocked)
 secure-no-suid-fixup: no (unlocked)
 secure-keep-caps: no (unlocked)
 secure-no-ambient-raise: no (unlocked)
uid=0(root) euid=0(root)
gid=0(root)
groups=0(root)
Guessed mode: UNCERTAIN (0)
/proc/self/oom_adj:8
/proc/self/oom_score:1000
/proc/self/oom_score_adj:500
pid 22180's OOM score adjust value changed from 500 to -101
~# choom -p $$ -n 500
pid 22027's OOM score adjust value changed from 500 to 500
~# capsh --drop=all -- -c 'capsh --print; grep -H . /proc/self/oom*; choom -p $$ -n -101'
Current: =
Bounding set =
Ambient set =
...
uid=0(root) euid=0(root)
gid=0(root)
groups=0(root)
Guessed mode: UNCERTAIN (0)
/proc/self/oom_adj:8
/proc/self/oom_score:1000
/proc/self/oom_score_adj:500
choom: failed to set score adjust value: Permission denied

I have no idea what's going on, but it breaks
exec-oomscoreadjust-negative.service from test-execute when running
unprivileged.

3 months agoci: make the build dir accessible when running w/o privileges
Frantisek Sumsal [Wed, 6 Mar 2024 14:04:22 +0000 (15:04 +0100)] 
ci: make the build dir accessible when running w/o privileges

Otherwise the unprivileged part of test-execute gets silently skipped:

/* test_run_tests_unprivileged */
Successfully forked off '(test-execute-unprivileged)' as PID 20998.
...
pin_callout_binary: build dir binary: /home/runner/work/systemd/systemd/build/systemd-executor
pin_callout_binary: open(/home/runner/work/systemd/systemd/build/systemd-executor)=-13
Failed to pin executor binary: No such file or directory
(test-execute-unprivileged): manager_new, skipping tests: No such file or directory
(test-execute-unprivileged) succeeded.

3 months agoboot: replace manual string manipulation with xasprintf
TobiPeterG [Wed, 28 Feb 2024 14:53:34 +0000 (15:53 +0100)] 
boot: replace manual string manipulation with xasprintf

3 months agoImprove the formatting by adding AlignArrayOfStructures and setting it to Right(right...
Unique-Usman [Wed, 6 Mar 2024 13:30:36 +0000 (19:00 +0530)] 
Improve the formatting by adding AlignArrayOfStructures and setting it to Right(right justify)

3 months agomeson: Remove version_h dependency from jinja2_cmdline 31656/head
Daan De Meyer [Wed, 6 Mar 2024 14:16:52 +0000 (15:16 +0100)] 
meson: Remove version_h dependency from jinja2_cmdline

version_h includes GIT_VERSION which only makes sense for C files
which aren't preprocessed by jinja2 so remove the argument.

The end result of this change is that the man pages are not recompiled
anymore every time GIT_VERSION changes.

3 months agoUse VERSION_TAG instead of GIT_VERSION in kernel-install scripts
Daan De Meyer [Wed, 6 Mar 2024 14:15:55 +0000 (15:15 +0100)] 
Use VERSION_TAG instead of GIT_VERSION in kernel-install scripts

GIT_VERSION only makes sense for C files as it depends on C preprocessor
macro expansion now so let's use VERSION_TAG instead of GIT_VERSION
for the two remaining usages of GIT_VERSION that are not in C files.

3 months agoMerge pull request #31580 from poettering/resolved-naptr
Luca Boccassi [Wed, 6 Mar 2024 14:14:11 +0000 (14:14 +0000)] 
Merge pull request #31580 from poettering/resolved-naptr

resolved: properly decode NAPTR RRs

3 months agoMerge pull request #31621 from poettering/resolved-proxy-do
Luca Boccassi [Wed, 6 Mar 2024 13:55:14 +0000 (13:55 +0000)] 
Merge pull request #31621 from poettering/resolved-proxy-do

resolved: proxy upstream local requests to our stub with DO bit set

3 months agostring-util: allow taking SIZE_MAX as size to shorten to
Lennart Poettering [Wed, 6 Mar 2024 08:43:09 +0000 (09:43 +0100)] 
string-util: allow taking SIZE_MAX as size to shorten to

This is useful for two reasons:

1. it addresses a potential overflow in a graceful way

2. Gives callers the ability to just pass SIZE_MAX for a NOP

Prompted by: #31341

3 months agoudev: use strndupa_safe() rather than strndupa()
Lennart Poettering [Wed, 6 Mar 2024 08:45:55 +0000 (09:45 +0100)] 
udev: use strndupa_safe() rather than strndupa()

As per coding style, we don't use strndupa(), but strndupa_safe() only.

As a side-effect, this means musl folks can just drop this mess:

https://git.openembedded.org/openembedded-core/tree/meta/recipes-core/systemd/systemd/0003-src-basic-missing.h-check-for-missing-strndupa.patch

3 months agoPORTABLE_SERVICES.md: Improve grammar
Christian Wesselhoeft [Tue, 5 Mar 2024 22:26:01 +0000 (15:26 -0700)] 
PORTABLE_SERVICES.md: Improve grammar

3 months agomeson/man: allow man pages to use multiple conditions
Zbigniew Jędrzejewski-Szmek [Tue, 5 Mar 2024 13:41:17 +0000 (17:41 +0400)] 
meson/man: allow man pages to use multiple conditions

This way the man pages are installed only when the corresponding binary is
installed. The conditions in man pages and man/rules/meson.build are adjusted to
match the conditions for units in units/meson.build.

3 months agoukify: convert certificate to public key before embedding in .pcrpkey
Luca Boccassi [Mon, 4 Mar 2024 23:12:26 +0000 (23:12 +0000)] 
ukify: convert certificate to public key before embedding in .pcrpkey

Follow-up for 419b25ddcac39cf967555c7a2eaa274fbf1ad03c

3 months agoMerge pull request #31642 from weblate/weblate-systemd-main
Frantisek Sumsal [Wed, 6 Mar 2024 09:40:41 +0000 (10:40 +0100)] 
Merge pull request #31642 from weblate/weblate-systemd-main

Translations update from Fedora Weblate

3 months agotest: use 'ahost' instead of 'hosts' where applicable
Frantisek Sumsal [Tue, 5 Mar 2024 17:19:17 +0000 (18:19 +0100)] 
test: use 'ahost' instead of 'hosts' where applicable

As explained in [0] the 'hosts' database uses deprecated
gethostbyname2() which uses AF_INET6 instead of AF_UNSPEC for IPv6
lookups which is broken and makes the test fail with disabled IPv6.

[0] https://github.com/systemd/systemd/pull/28136#issuecomment-1974901039

3 months agopo: Translated using Weblate (Georgian) 31642/head
Temuri Doghonadze [Tue, 5 Mar 2024 21:36:03 +0000 (22:36 +0100)] 
po: Translated using Weblate (Georgian)

Currently translated at 100.0% (233 of 233 strings)

Co-authored-by: Temuri Doghonadze <temuri.doghonadze@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/ka/
Translation: systemd/main

3 months agopo: Translated using Weblate (Ukrainian)
Yuri Chornoivan [Tue, 5 Mar 2024 21:36:02 +0000 (22:36 +0100)] 
po: Translated using Weblate (Ukrainian)

Currently translated at 100.0% (233 of 233 strings)

Co-authored-by: Yuri Chornoivan <yurchor@ukr.net>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/uk/
Translation: systemd/main

3 months agopo: Translated using Weblate (Swedish)
Göran Uddeborg [Tue, 5 Mar 2024 21:36:02 +0000 (22:36 +0100)] 
po: Translated using Weblate (Swedish)

Currently translated at 100.0% (233 of 233 strings)

Co-authored-by: Göran Uddeborg <goeran@uddeborg.se>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/sv/
Translation: systemd/main