Commit Graph

69960 Commits

Author SHA1 Message Date
Frantisek Sumsal
2fe03e25fb shell-completion: fix mixed indent 2024-01-05 19:21:51 +01:00
Frantisek Sumsal
68f66a1713 journalctl: implement --list-namespaces
Apart from being useful on its own, this will be used in the following
commit for shell completions.
2024-01-05 19:21:51 +01:00
Lennart Poettering
35a7dd4834 Merge pull request #30728 from polarina/noda
Assign noDA attribute to TPM2 objects not dependant on a PIN
2024-01-05 11:04:11 +01:00
Adrian Vovk
cc51085a41 core: Add %D specifier for $XDG_DATA_HOME
We already have specifiers that resolve to $XDG_STATE_HOME, and
$XDG_CONFIG_HOME. $XDG_DATA_HOME is in a similar vein.

It allows units belonging to the user service manager to correctly look
into ~/.local/share. I imagine this would be most useful inside of
condition checks (i.e. only run a service on session startup if some
data is not found in ~/.local/share) or in the inotify monitoring of a
.path unit
2024-01-05 11:03:06 +01:00
Yu Watanabe
2743854540 network: do not make the implied default have the first priority
Follow-up for b732606950 and
6706ce2fd2.

If Network.ignore_carrier_loss_set flag is set, then the timeout value
is always used, hence the logic implemented by
b732606950 never worked.
2024-01-05 18:04:18 +09:00
Mike Yuan
9c02eb283a core/cgroup: use designated initializer more, make dup source const 2024-01-05 10:01:52 +01:00
Lennart Poettering
4e99803f23 Merge pull request #30731 from poettering/logind-user-early
logind: rework the special casing we give root's sessions
2024-01-05 10:01:30 +01:00
Alberto Planas
ef949448ec Use .d path for PCRLOCK_KERNEL_*_PATH
Fix the path for the generated.pcrlock files for the cmdline and initrd
cases.  Without it the tool complains with:

    Failed to parse component file /var/lib/pcrlock.d/720-kernel-initrd.pcrlock, ignoring: Is a directory

Signed-off-by: Alberto Planas <aplanas@suse.com>
2024-01-05 10:00:42 +01:00
Lennart Poettering
c759fad16c Merge pull request #30753 from aafeijoo-suse/special-refactor
tree-wide: use defines from special.h in some missing places
2024-01-05 10:00:03 +01:00
Lennart Poettering
e745400bee Merge pull request #30769 from AdrianVovk/statx-timestamp
stat-util: Add statx version of timespec_load
2024-01-05 09:59:40 +01:00
Luca Boccassi
90043781ba Merge pull request #30743 from bluca/coverity
Assorted coverity fixes
2024-01-05 09:27:21 +01:00
Luca Boccassi
08b099a005 Merge pull request #30774 from mrc0mmand/test-tweaks
test: install correct kpartx udev rules (again) and dump cores of sanitized binaries
2024-01-05 09:26:42 +01:00
Luca Boccassi
6a80e22766 Merge pull request #30759 from mrc0mmand/resolved-followup
resolve: initialize `r` during OOM
2024-01-05 09:26:19 +01:00
Sergei Zhmylev
25aa35d465 journalctl: add --exclude-identifier option 2024-01-04 23:21:39 +01:00
Lennart Poettering
42301b6d96 creds-util: automatically append NUL byte to decrypted creds
Both as safety net and as convenience feature of a string is contained
in the credential
2024-01-04 22:57:04 +01:00
Lennart Poettering
6d78dc2827 creds: rename "tpm2-absent" encryption to "null" encryption
This is what it is after all: encryption with a NULL key. This is more
descriptive, but also relevant since we want to use this kind of
credentials in a different context soon: for carrying pcrlock data into
a UKI. In that case we don#t want encryption, since the pcrlock data is
intended to help unlocking secrets, hence should not be a secret itself.

This only changes the code labels and the way this is labelled in the
output. We retain compat with the old name.
2024-01-04 22:56:48 +01:00
Lennart Poettering
01ae684782 find-esp: adjust parameter indentating to our usual coding style 2024-01-04 22:56:33 +01:00
Lennart Poettering
489f67b4d8 logind: use unlink_and_free() at once more place 2024-01-04 22:56:20 +01:00
Lennart Poettering
bd334c0ebb json: drop redundant check
The same check is done exactly one line later, because this is one of
the things that json_variant_is_regular() checks.

As per: fa9a6db478 (r1441792019)
2024-01-04 22:55:42 +01:00
Lennart Poettering
86e62e9e02 Merge pull request #30749 from poettering/tmpfiles-verb-fix
tmpfiles: correctly apply globbing when cleaning 'x' lines
2024-01-04 22:55:23 +01:00
Lennart Poettering
a1e5800a27 Merge pull request #30758 from YHNdnzj/vpick-not-ptr
vpick: trivial follow-up
2024-01-04 22:54:41 +01:00
Frantisek Sumsal
96e4c62698 ci: build with -O2 and -Wmaybe-uninitialized
According to the comment in meson.build this should be a supported
configuration, so let's test it in the CI as well.
2024-01-04 21:27:10 +01:00
Frantisek Sumsal
0a87b83497 shared: initialize a couple of values explicitly
As gcc has trouble figuring this itself with -O2 and -Wmaybe-initialized.
2024-01-04 20:57:03 +01:00
Frantisek Sumsal
5169f8cfd5 resolve: initialize r during OOM
Otherwise we'd use some garbage value in the error path.

../src/resolve/resolved-dns-query.c: In function ‘dns_query_accept’:
../src/resolve/resolved-dns-query.c:944:27: error: ‘r’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  944 |         q->answer_errno = -r;
      |                           ^~
cc1: all warnings being treated as errors

Follow-up for 9ca133e97a.
2024-01-04 20:56:21 +01:00
Frantisek Sumsal
91da9458f8 test: allow sanitized binaries to dump a core
If a binary built with ASan crashes for a reason unrelated to ASan
stuff, we're left with pretty much nothing, as there is neither an ASan
trace nor a coredump. Let's make this slightly more debug-able by
allowing such binaries to dump a core, but without the huge shadow map
(we should be actually fine by just setting disable_coredump=0, since
use_madv_dontdump defaults to true, but let's play it safe and not
potentially dump a 16+ TB core file).
2024-01-04 20:36:25 +01:00