1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00
Commit Graph

71634 Commits

Author SHA1 Message Date
Mike Yuan
04ed3a1f8e logind-dbus: count user-early sessions in verify_shutdown_creds too
Follow-up for 59afe07c21
2024-03-07 22:56:40 +00:00
Luca Boccassi
12adbb6dc7
Merge pull request #31659 from YHNdnzj/freezer-followup
Freezer trivial follow-up
2024-03-07 22:55:56 +00:00
Mike Yuan
45df233e5f
sleep: fix typo (sysupend -> suspend) 2024-03-08 01:10:10 +08:00
Mike Yuan
dc35af47df
bus-unit-util: trivial follow-up for UnitFreezer
Follow-up for 7483708131

Make sure that function param names match between
source and header. Also, place UnitFreezer params
in front.
2024-03-08 01:10:09 +08:00
Mike Yuan
5ba6321d86
bus-unit-util: define FREEZE_BUS_CALL_TIMEOUT locally
Follow-up for f274f8bf25

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.
2024-03-08 01:09:01 +08:00
Ronan Pigott
4e17de7fee man/resolve: update DNSSEC description
This behavior was changed.

Fixes: 9c47b33444 ("resolved: enable DNS proxy mode if client wants DNSSEC")
2024-03-07 11:29:48 +00:00
Luca Boccassi
5e418fe32a
Merge pull request #31590 from YHNdnzj/install-cleanup
shared/install: several cleanups
2024-03-07 11:28:04 +00:00
Luca Boccassi
f6f5d8ae27
Merge pull request #31628 from YHNdnzj/tmpfiles-acl
tmpfiles: fix for 'X' bit handling and use it where appropriate
2024-03-07 11:27:15 +00:00
Xiaotian Wu
ff37c9fcbe 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.
2024-03-07 19:14:30 +09:00
Daan De Meyer
61fbdd441f
Merge pull request #31345 from DaanDeMeyer/mkosi-packages
Build distribution packages in mkosi
2024-03-07 11:12:14 +01:00
Daan De Meyer
4d0f1451b5 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.
- ...
2024-03-07 10:47:19 +01:00
Daan De Meyer
542bad6552 mkosi: Update to v21 2024-03-07 10:47:01 +01:00
Mike Yuan
661ece467a
Merge pull request #31664 from bluca/coverity
Coverity fixes
2024-03-07 16:02:57 +08:00
SidhuRupinder
6ad20da18a
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>
2024-03-07 10:31:59 +09:00
Luca Boccassi
6d1321c328
Merge pull request #31616 from poettering/resolved-varlink-resolve-record
resolved: add varlink API for resolving raw RRs
2024-03-07 01:00:27 +00:00
Luca Boccassi
4365a481b6 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 6399be223b
2024-03-07 00:51:43 +00:00
Luca Boccassi
60cf40599a escape: fix operator precedence in overflow check
CID#1535100

Follow-up for c6342e35b0
2024-03-07 00:46:21 +00:00
Michael Biebl
73d8990930 man: fix systemd-timedated man page wrt ntp-units.d
The service parsing/using this directory is systemd-timedated, not
systemd-timesyncd.
2024-03-06 21:44:12 +00:00
Mike Yuan
22549ff473
tmpfiles.d/systemd: use ACL 'X' bit where appropriate 2024-03-07 03:19:08 +08:00
Mike Yuan
29a438e764
tmpfiles: do 'X' bit check in an ACL-aware manner
Follow-up for 26d98cdd78

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.
2024-03-07 03:18:46 +08:00
Mike Yuan
83a5db202d
tmpfiles: remove one more use of goto and modernization 2024-03-07 03:18:46 +08:00
Mike Yuan
d41f08bd2a
core,install: generalize install error handling 2024-03-07 02:05:15 +08:00
Mike Yuan
b412274fd0
shared/install: use FOREACH_ARRAY at one more place 2024-03-07 02:02:00 +08:00
Mike Yuan
b2751cf039
shared/install: use RET_GATHER more 2024-03-07 02:02:00 +08:00
Mike Yuan
7dfc71399d
path-lookup: rename lookup_paths_free -> _done
This is stack-allocated, so update to match our usual rules.
2024-03-07 02:01:57 +08:00
Lennart Poettering
cf1c8cdb87 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.
2024-03-06 19:00:53 +01:00
Lennart Poettering
0fe9c5da02 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.
2024-03-06 19:00:53 +01:00
Ronan Pigott
da920fe176 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.
2024-03-06 18:57:36 +01:00
Lennart Poettering
74d142ff3a
Merge pull request #30612 from AdrianVovk/sleep-freeze-user-seesions
Freeze user sessions for all types of sleep
2024-03-06 18:52:57 +01:00
Lennart Poettering
19c4dd17f9
Merge pull request #31592 from YHNdnzj/exit-cgroup-notify
core/service: two fixes for ExitType=cgroup
2024-03-06 18:38:51 +01:00
Yu Watanabe
3d1279af79 meson: add missing dependency to libdl
Follow-up for 1c20c9f4fc.

Fixes https://github.com/systemd/systemd/pull/31550#issuecomment-1980458377.
2024-03-06 17:24:03 +00:00
Luca Boccassi
9a6acbdc03
Merge pull request #31657 from mrc0mmand/test-execute-shenanigans
A couple of tweaks for test-execute
2024-03-06 17:22:39 +00:00
Daan De Meyer
083f4f8f20
Merge pull request #31656 from DaanDeMeyer/meson
meson: Remove version_h dependency from jinja2_cmdline
2024-03-06 16:20:13 +01:00
Frantisek Sumsal
7161af9612 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.
2024-03-06 16:10:47 +01:00
Frantisek Sumsal
c538fecc61 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.
2024-03-06 16:10:47 +01:00
TobiPeterG
5ff20f638b boot: replace manual string manipulation with xasprintf 2024-03-06 15:07:26 +00:00
Unique-Usman
c742317274 Improve the formatting by adding AlignArrayOfStructures and setting it to Right(right justify) 2024-03-06 15:24:23 +01:00
Daan De Meyer
5c25f9dbc5 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.
2024-03-06 15:16:52 +01:00
Daan De Meyer
76940e0a04 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.
2024-03-06 15:15:55 +01:00
Luca Boccassi
5e575e4d92
Merge pull request #31580 from poettering/resolved-naptr
resolved: properly decode NAPTR RRs
2024-03-06 14:14:11 +00:00
Luca Boccassi
ba6ec879bb
Merge pull request #31621 from poettering/resolved-proxy-do
resolved: proxy upstream local requests to our stub with DO bit set
2024-03-06 13:55:14 +00:00
Lennart Poettering
d49dc7bbe7 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
2024-03-06 13:24:15 +00:00
Lennart Poettering
10d50d9eac 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
2024-03-06 13:23:17 +00:00
Christian Wesselhoeft
da95494ca3 PORTABLE_SERVICES.md: Improve grammar 2024-03-06 10:02:38 +00:00
Zbigniew Jędrzejewski-Szmek
ec3cf73f30 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.
2024-03-06 09:55:01 +00:00
Luca Boccassi
4d34622d22 ukify: convert certificate to public key before embedding in .pcrpkey
Follow-up for 419b25ddca
2024-03-06 09:53:02 +00:00
Frantisek Sumsal
9990fe8257
Merge pull request #31642 from weblate/weblate-systemd-main
Translations update from Fedora Weblate
2024-03-06 10:40:41 +01:00
Frantisek Sumsal
4e5a7e1923 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
2024-03-06 01:15:30 +00:00
Temuri Doghonadze
4c9837da42 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
2024-03-06 02:06:50 +01:00
Yuri Chornoivan
48e7ed190e 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
2024-03-06 02:06:50 +01:00