1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-25 01:34:28 +03:00
Commit Graph

72170 Commits

Author SHA1 Message Date
Unique-Usman
c0cd99eee6 Follow up with the PR #31819 2024-03-20 15:48:05 +00:00
Luca Boccassi
c3a55dc469
Merge pull request #31844 from keszybz/missing-extra-checks
Add static asserts to verify that our missing_*.h headers defines are actually correct
2024-03-20 15:47:05 +00:00
Yu Watanabe
1c8e8ec0ff Revert "test: temporarily adjust the default mount rate limit"
This reverts commit 3f4b00a34a.

The issue #30573 seems to be fixed somehow. Let's revert the workaround.
2024-03-20 15:36:05 +01:00
cunshunxia
cc59d1014f man: fix a few issues in manpage
fix: #31482

Signed-off-by: cunshunxia <cunshunxia@tencent.com>
2024-03-20 15:24:11 +01:00
Zbigniew Jędrzejewski-Szmek
3a08372d18 shared/password-quality: inline iterator variable 2024-03-20 15:18:21 +01:00
Zbigniew Jędrzejewski-Szmek
045d94248d core: use strdup_to()
Those are all pretty straightforward.
2024-03-20 15:18:21 +01:00
Zbigniew Jędrzejewski-Szmek
b8486f2592 oomd: use strdup_to() and RET_GATHER() 2024-03-20 15:18:21 +01:00
Zbigniew Jędrzejewski-Szmek
196166dbb1 basic/unit-name: use strdup_to() in slice_build_parent_slice()
The handling of the buffer is not obvious, so add a comment.
2024-03-20 15:18:21 +01:00
Zbigniew Jędrzejewski-Szmek
32baca0023 logind: use strdup_to() 2024-03-20 15:18:21 +01:00
Zbigniew Jędrzejewski-Szmek
b41f88a23c shared/dissect-image: use strdup_to_full() in one more place 2024-03-20 15:18:21 +01:00
Zbigniew Jędrzejewski-Szmek
237bbec117 machinectl: use strdup_to() and move cleanup out of the loop
It doesn't matter much, but it seems nicer to call va_end() just
once.
2024-03-20 15:18:21 +01:00
Zbigniew Jędrzejewski-Szmek
4ab305fa3b basic/time-util: use strdup_to() and reformat a bit 2024-03-20 15:18:21 +01:00
Zbigniew Jędrzejewski-Szmek
8f6ea3e827 sd-journal/catalog: use strdup_to(), rename output param 2024-03-20 15:18:21 +01:00
Zbigniew Jędrzejewski-Szmek
bca4dc29df sd-device: use strdup_to() and rename output param
device_open_from_devnum() returns two things: the devname via
an output param, and the fd via the return value. Rename the param
to signal that it's not the only return channel.
2024-03-20 15:18:21 +01:00
Zbigniew Jędrzejewski-Szmek
bef2c63a40 shared: use strdup_to() in specifier functions 2024-03-20 15:18:21 +01:00
Zbigniew Jędrzejewski-Szmek
6a705f1234 Replace strdup_or_null() by strdup_to()
I didn't know that this helper existed… It is very similar to strdup_to_full(),
but all callers can actually be replaced by strdup_to(), which has more fitting
semantics.
2024-03-20 15:18:21 +01:00
Zbigniew Jędrzejewski-Szmek
f174b294f6 basic/string-util: use strdup_to() in string_extract_line() 2024-03-20 15:18:21 +01:00
Zbigniew Jędrzejewski-Szmek
4eb3ec63b0 basic/socket-util: use strdup_to() in sockaddr_pretty()
The function was written to support ret==NULL, but the only caller always
passes ret, and sockaddr_pretty() also requires ret to be set, so that
half-implemented code wasn't very useful.
2024-03-20 15:18:21 +01:00
Zbigniew Jędrzejewski-Szmek
f394876140 coredump: use free_and_strdup_warn() more 2024-03-20 15:18:21 +01:00
Zbigniew Jędrzejewski-Szmek
55222b75a6 systemd-analyze: use strdup_to() 2024-03-20 15:18:21 +01:00
Zbigniew Jędrzejewski-Szmek
94b75cdb06 basic/fileio: use strdup_to_full() in read_stripped_line()
The return value of read_stripped_line() is changed. Before we'd return the
number of characters read, but that number was not meaningful after we called
strstrip(). So just return 0 if nothing was read (EOF), and 1 if something was
read (not EOF). All the callers were only checking for <0 or ==0.
2024-03-20 15:18:21 +01:00
Zbigniew Jędrzejewski-Szmek
4f77ddca59 various: also use strdup_to() in cases where we don't return immediately 2024-03-20 15:18:21 +01:00
Zbigniew Jędrzejewski-Szmek
418b936d47 various: use strdup_to() after getenv() 2024-03-20 15:18:21 +01:00
Zbigniew Jędrzejewski-Szmek
454318d3e8 various: use strdup_to() in various obvious cases
strdup_to() returns 0 on success and here we convert obvious blocks
which either return -ENOMEM or 0.
2024-03-20 15:13:44 +01:00
Zbigniew Jędrzejewski-Szmek
7e850da3d6 test-cgroup-util: reduce scope of iterator variables 2024-03-20 15:13:44 +01:00
Zbigniew Jędrzejewski-Szmek
8922a728f7 basic/cgroup-util: use strdup_to() and strdup_to_full() as appropriate 2024-03-20 15:13:44 +01:00
Zbigniew Jędrzejewski-Szmek
d3a3d2d328 hostnamed: use strdup_to_full() 2024-03-20 15:13:44 +01:00
Zbigniew Jędrzejewski-Szmek
892c5902ae src/basic: add yet another strdup helper
It's a bit ugly to have both strdup_to() and strdup_to_full(). I initially
started with one variant, but then in some functions we want the additional
info, while in many other places, having 1 instead of 0 causes the return
value of whole chains of functions to be changed. It *probably* wouldn't cause
any difference, but there is at least of bunch of tests that would need to be
updated, so in the end it seems to have the two variants.

The output param is first to match free_and_strdup() and other similar
functions.
2024-03-20 15:12:12 +01:00
Luca Boccassi
aa5703f66f
Merge pull request #31827 from rpigott/resolved-faster-dnssec
Reduce superfluous dnssec transactions
2024-03-20 13:17:40 +00:00
Frantisek Sumsal
e9f8ad4073
Merge pull request #31867 from jamacku/update-freezer
Update development freeze GitHub Action; now milestones are taken into account
2024-03-20 13:37:37 +01:00
Jan Macku
ec8c80eddb ci(freezer): update devel-freezer GHA to v1.1.0
The new version of `devel-freezer` GitHub Action adds support for milestones, labels, and more. Now, when the `rc` tag is published, it won't post a development freeze comment on PRs included in the next milestone.

This commit also sets a delay of the 20s for PR validation to give some time for updating labels and milestones on submitted PRs.
2024-03-20 12:37:18 +01:00
Zbigniew Jędrzejewski-Szmek
0dee6f7a7b basic/missing_audit: add explanatory comment
It seems we need to check for the header file because it's not available in
some fuzzer builds.
2024-03-20 12:26:24 +01:00
Zbigniew Jędrzejewski-Szmek
aee547b97b basic/missing_*.h: indentation tweaks 2024-03-20 12:26:16 +01:00
Zbigniew Jędrzejewski-Szmek
4d6437d33c basic/missing_*.h: add asserts that the values are as expected
It's great that we provide fallback values, but if we got one of those wrong,
it could be a long time before anyone noticed. So let's add asserts that the
our internal defines actually match the official ones, when the latter are
available.

I did not add '#include "macro.h"' to missing_{audit,capability}, because
those are processed by an awk script that would need additional include
directories and could be confused by the additional lines. We don't include
those headers standalone anyway, so this is not necessary anyway.
2024-03-20 12:26:16 +01:00
Zbigniew Jędrzejewski-Szmek
7258971b13 basic/missing_ioprio: include the proper header file
IOPRIO_* is defined in linux/ioprio.h, so we were always using our fallback
definitions.

The header list in meson.build is sorted. I'm not sure why it wasn't.
2024-03-20 12:25:47 +01:00
Gerd Hoffmann
102138a12e sd-boot: add support for custom mode.
Custom mode allows to write updates to db, dbx, KEK and PK without
signature.  See the comment block for a more detailed description.

In case the PK update has no signature try to enable custom mode.
2024-03-20 11:04:14 +00:00
Jan Macku
2547791075 ci(freezer): update metadata and development_freeze workflow
use custom action to gather PR metadata and download artifact rather then inline script
2024-03-20 10:44:31 +01:00
Jan Macku
b026b9edf5 ci(metadata): remove fetch-depth: 0 it's not needed anymore 2024-03-20 10:35:40 +01:00
Daan De Meyer
2e52b6c661 log: Make warning messages more consistent
Use our usual pattern of ", ignoring.".
2024-03-20 09:30:39 +01:00
Gerd Hoffmann
3037616d8e kernel-install: fix uki-copy deinstall
For "kernel-install remove ..." only the kernel version is passed, not
the kernel image.  So auto-detecting KERNEL_INSTALL_IMAGE_TYPE and
setting KERNEL_INSTALL_LAYOUT does not work for uninstall.

The 90-uki-copy.install plugin must consider this and *not* exit early
for the "remove" command, otherwise $BOOT_ROOT will be filled with stale
kernel images.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2024-03-20 11:35:13 +09:00
Zbigniew Jędrzejewski-Szmek
fb01ab09d3 TODO: drop entry about renaming
NamespaceId is inconsistent with our general spelling rules which say that
capitalization of acronyms should not be changed when they are concatenated in
CapitalizedCamelCase strings. But NamespaceId was added in
f2ef8b28a5, before v249, so it's too late to
change it. OTOH, NamespaceNSID cannot really be spelled in any other way.
"NamespaceNsid" would be quite bad. So let's just ignore the inconsistency in
naming, this seems to be the least bad option.
2024-03-19 23:55:03 +01:00
Ronan Pigott
cd40efc671 dnssd: don't advertise subtype PTRs to the browsing domain
The RFC6763 § 9 recommendation is to advertise only the two-label
service names.

Fixes: 88123aa21c ("dnssd: support service subtypes")
2024-03-19 22:47:00 +00:00
Daan De Meyer
30f08c303a mkosi: Update debian to latest
Fixes mkosi builds
2024-03-19 22:46:03 +00:00
Yu Watanabe
46325d9324 terminal-util: fix underlying with SYSTEMD_COLORS=no
Fixes #31857.
2024-03-19 22:21:56 +01:00
dependabot[bot]
8f76cb55b8 build(deps): bump pkg/arch from 733045c to b33762d
Bumps pkg/arch from `733045c` to `b33762d`.

---
updated-dependencies:
- dependency-name: pkg/arch
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-19 22:17:07 +01:00
Zbigniew Jędrzejewski-Szmek
7aed434371 Rename uid0 to run0
Naming is always a matter of preference, and the old name would certainly work,
but I think the new one has the following advantages:
- A verb is better than a noun.
- The name more similar to "the competition", i.e. 'sudo', 'pkexec', 'runas',
  'doas', which generally include an action verb.
- The connection between 'systemd-run' and 'run0' is more obvious.

There has been no release yet with the old name, so we can rename without
caring for backwards compatibility.
2024-03-19 16:37:22 +01:00
Zbigniew Jędrzejewski-Szmek
d1f3cd7aaa units: add one more equivalency of '-' in '_' on kernel cmdline
c0aeff4b99 added this in one unit file, but the
same problem occurs here. (There are no other files where this would apply.)
I think we should solve this systematically somehow, but it's not clear how to
do that, so until we have that better solution, let's apply the manual solution
so that our units work as expected.
2024-03-19 13:06:44 +00:00
Daan De Meyer
db7374e156 Document new vsock literals
Fixes #31849
2024-03-19 12:31:36 +00:00
Unique-Usman
e19186359a Add a set of assertion macros to tests.h
(ASSERT_OK(), ASSERT_EQ(), ASSERT_GE(), ASSERT_LE()) that log the failed condition before crashing and convert test-gpt.c test file to use them
2024-03-19 11:37:45 +00:00
Abraham Samuel Adekunle
6644445586 Add new unittest for shared:recovery-key 2024-03-19 11:02:39 +00:00